\hypertarget{classnntrainer_1_1SliceRealizer}{}\doxysection{nntrainer\+::Slice\+Realizer Class Reference}
\label{classnntrainer_1_1SliceRealizer}\index{nntrainer::SliceRealizer@{nntrainer::SliceRealizer}}


Graph realizer class which slice graph representation.  




{\ttfamily \#include $<$slice\+\_\+realizer.\+h$>$}



Inheritance diagram for nntrainer\+::Slice\+Realizer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=216pt]{classnntrainer_1_1SliceRealizer__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for nntrainer\+::Slice\+Realizer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=216pt]{classnntrainer_1_1SliceRealizer__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classnntrainer_1_1SliceRealizer_a30562ff2f5330e6c70955a55f89485de}{Slice\+Realizer}} (const std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Connection}{Connection}} $>$ \&start\+\_\+connections, const std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Connection}{Connection}} $>$ \&end\+\_\+connections)
\begin{DoxyCompactList}\small\item\em Construct a new Slice Realizer object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classnntrainer_1_1SliceRealizer_ae78438ed4dc2d09307d31d08ef501963}{$\sim$\+Slice\+Realizer}} ()
\begin{DoxyCompactList}\small\item\em Destroy the Graph Realizer object. \end{DoxyCompactList}\item 
Graph\+Representation \mbox{\hyperlink{classnntrainer_1_1SliceRealizer_ab6f6d493ffff553b0def2bdf21a8453c}{realize}} (const Graph\+Representation \&reference) override
\begin{DoxyCompactList}\small\item\em graph realizer creates a new graph based on the reference \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Graph realizer class which slice graph representation. 



Definition at line 30 of file slice\+\_\+realizer.\+h.



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classnntrainer_1_1SliceRealizer_a30562ff2f5330e6c70955a55f89485de}\label{classnntrainer_1_1SliceRealizer_a30562ff2f5330e6c70955a55f89485de}} 
\index{nntrainer::SliceRealizer@{nntrainer::SliceRealizer}!SliceRealizer@{SliceRealizer}}
\index{SliceRealizer@{SliceRealizer}!nntrainer::SliceRealizer@{nntrainer::SliceRealizer}}
\doxysubsubsection{\texorpdfstring{SliceRealizer()}{SliceRealizer()}}
{\footnotesize\ttfamily nntrainer\+::\+Slice\+Realizer\+::\+Slice\+Realizer (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Connection}{Connection}} $>$ \&}]{start\+\_\+connections,  }\item[{const std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Connection}{Connection}} $>$ \&}]{end\+\_\+connections }\end{DoxyParamCaption})}



Construct a new Slice Realizer object. 


\begin{DoxyParams}{Parameters}
{\em start\+\_\+connections} & start layers \\
\hline
{\em end\+\_\+connections} & end layers \\
\hline
\end{DoxyParams}
discard index information as it is not needed as it is not really needed

Definition at line 22 of file slice\+\_\+realizer.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1SliceRealizer_ae78438ed4dc2d09307d31d08ef501963}\label{classnntrainer_1_1SliceRealizer_ae78438ed4dc2d09307d31d08ef501963}} 
\index{nntrainer::SliceRealizer@{nntrainer::SliceRealizer}!````~SliceRealizer@{$\sim$SliceRealizer}}
\index{````~SliceRealizer@{$\sim$SliceRealizer}!nntrainer::SliceRealizer@{nntrainer::SliceRealizer}}
\doxysubsubsection{\texorpdfstring{$\sim$SliceRealizer()}{~SliceRealizer()}}
{\footnotesize\ttfamily nntrainer\+::\+Slice\+Realizer\+::$\sim$\+Slice\+Realizer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Destroy the Graph Realizer object. 



Definition at line 36 of file slice\+\_\+realizer.\+cpp.



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classnntrainer_1_1SliceRealizer_ab6f6d493ffff553b0def2bdf21a8453c}\label{classnntrainer_1_1SliceRealizer_ab6f6d493ffff553b0def2bdf21a8453c}} 
\index{nntrainer::SliceRealizer@{nntrainer::SliceRealizer}!realize@{realize}}
\index{realize@{realize}!nntrainer::SliceRealizer@{nntrainer::SliceRealizer}}
\doxysubsubsection{\texorpdfstring{realize()}{realize()}}
{\footnotesize\ttfamily Graph\+Representation nntrainer\+::\+Slice\+Realizer\+::realize (\begin{DoxyParamCaption}\item[{const Graph\+Representation \&}]{reference }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



graph realizer creates a new graph based on the reference 

\begin{DoxyNote}{Note}
for each layer in start\+\_\+layers, start dfs, if traversal meets an end layers, node is added to an ordered set. 
\end{DoxyNote}

\begin{DoxyExceptions}{Exceptions}
{\em std\+::invalid\+\_\+argument} & if created Graph\+Representation is empty \\
\hline
\end{DoxyExceptions}
$<$ set this if not visited

$<$ set this if visited

$<$ set this if it is to be added

\begin{DoxyNote}{Note}
mp has to be ordered map to keep the ordering of the nodes in the graph
\end{DoxyNote}
map point

setup children before filling in the end layers

if the give node is the end node in the graph

add node to be included to subgraph

dfs function to perform depth-\/first search recursively with tracking

if node already added or end node, add the current stack to be added to the subgraph

if node is visited, return

run dfs on all the children

run dfs from all the starting layers

created the subgraph

\begin{DoxyNote}{Note}
\+: iterate over reference than over mp to ensure the correct ordering of layers
\end{DoxyNote}


Implements \mbox{\hyperlink{classnntrainer_1_1GraphRealizer_a841b81262ea06e58655b512c3a0d05a9}{nntrainer\+::\+Graph\+Realizer}}.



Definition at line 39 of file slice\+\_\+realizer.\+cpp.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
compiler/\mbox{\hyperlink{slice__realizer_8h}{slice\+\_\+realizer.\+h}}\item 
compiler/\mbox{\hyperlink{slice__realizer_8cpp}{slice\+\_\+realizer.\+cpp}}\end{DoxyCompactItemize}
