\hypertarget{a00415}{
\section{mln::util::tree\_\-node$<$ T $>$ Class Template Reference}
\label{d0/dd6/a00415}\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}}
}


Class of generic \hyperlink{a00415}{tree\_\-node} for tree.  




{\ttfamily \#include $<$tree.hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00415}{tree\_\-node}$<$ T $>$ $\ast$ \hyperlink{a00415_afc0778eaefac17a8c559f2878af2e2da}{add\_\-child} (T elt)
\begin{DoxyCompactList}\small\item\em Create a \hyperlink{a00415}{tree\_\-node} with {\ttfamily elt} which become the child of the current \hyperlink{a00415}{tree\_\-node}. \item\end{DoxyCompactList}\item 
\hyperlink{a00415}{tree\_\-node}$<$ T $>$ $\ast$ \hyperlink{a00415_a4aa76396b58a0fcd63059ca8ad3dcbc3}{add\_\-child} (\hyperlink{a00415}{tree\_\-node}$<$ T $>$ $\ast$\hyperlink{a00415}{tree\_\-node})
\begin{DoxyCompactList}\small\item\em Bind {\ttfamily \hyperlink{a00415}{tree\_\-node}} to the current \hyperlink{a00415}{tree\_\-node} and become its child. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00415_ab8701dcfa8c3764596800fa3afe5264e}{check\_\-consistency} ()
\begin{DoxyCompactList}\small\item\em Check the consistency of the \hyperlink{a00415}{tree\_\-node}. \item\end{DoxyCompactList}\item 
children\_\-t \& \hyperlink{a00415_a0bebf364502d552386049609b87be5fe}{children} ()
\begin{DoxyCompactList}\small\item\em The getter of the children. \item\end{DoxyCompactList}\item 
const children\_\-t \& \hyperlink{a00415_a2c341d4bbd052294517c3b25fc783831}{children} () const 
\begin{DoxyCompactList}\small\item\em The getter of the children. \item\end{DoxyCompactList}\item 
\hyperlink{a00415}{tree\_\-node}$<$ T $>$ $\ast$ \hyperlink{a00415_a5a21bb13dce0d67bf0fcac9fa5ea8a3b}{delete\_\-tree\_\-node} ()
\begin{DoxyCompactList}\small\item\em Delete the current \hyperlink{a00415}{tree\_\-node}. \item\end{DoxyCompactList}\item 
T \& \hyperlink{a00415_a7185b19b58aa184d54580c8482b755c6}{elt} ()
\begin{DoxyCompactList}\small\item\em The getter of the element. \item\end{DoxyCompactList}\item 
const T \& \hyperlink{a00415_a947ea3cb4a7487e25460e09537832850}{elt} () const 
\begin{DoxyCompactList}\small\item\em The const getter of the element. \item\end{DoxyCompactList}\item 
\hyperlink{a00415}{tree\_\-node}$<$ T $>$ $\ast$ \hyperlink{a00415_aca717bc335cc044ec6afffe5f9ffbbd4}{parent} ()
\begin{DoxyCompactList}\small\item\em The getter of the parent. \item\end{DoxyCompactList}\item 
void \hyperlink{a00415_aa5e8de667ed405c042d8fd5686bd32ab}{print} (std::ostream \&ostr, int level=0)
\begin{DoxyCompactList}\small\item\em Print on {\ttfamily ostr} the arborescence with the current \hyperlink{a00415}{tree\_\-node} as root. \item\end{DoxyCompactList}\item 
\hyperlink{a00415}{tree\_\-node}$<$ T $>$ $\ast$ \hyperlink{a00415_abd861da673332ee1f2289e4970507cf4}{search} (T \&elt)
\begin{DoxyCompactList}\small\item\em Search the \hyperlink{a00415}{tree\_\-node} with value {\ttfamily elt} in the arborescence of the current \hyperlink{a00415}{tree\_\-node}. \item\end{DoxyCompactList}\item 
int \hyperlink{a00415_a0af129ce038cf8ae8aebbee394df6d18}{search\_\-rec} (\hyperlink{a00415}{tree\_\-node}$<$ T $>$ $\ast$$\ast$res, T \&elt)
\begin{DoxyCompactList}\small\item\em The using method for method search. \item\end{DoxyCompactList}\item 
void \hyperlink{a00415_a75629e82b0e7f30b010146cd8fad332f}{set\_\-parent} (\hyperlink{a00415}{tree\_\-node}$<$ T $>$ $\ast$parent)
\begin{DoxyCompactList}\small\item\em Bind {\ttfamily \hyperlink{a00415}{tree\_\-node}} to the current \hyperlink{a00415}{tree\_\-node} and become its parent. \item\end{DoxyCompactList}\item 
\hyperlink{a00415_ad2a7ec62feeb64edec37b2e49ea2b520}{tree\_\-node} ()
\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
\hyperlink{a00415_ab1854875fa55a63c27ce6979d8a87370}{tree\_\-node} (T elt)
\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename T$>$ class mln::util::tree\_\-node$<$ T $>$}

Class of generic \hyperlink{a00415}{tree\_\-node} for tree. 

Definition at line 58 of file tree.hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00415_ad2a7ec62feeb64edec37b2e49ea2b520}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!tree\_\-node@{tree\_\-node}}
\index{tree\_\-node@{tree\_\-node}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{tree\_\-node}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf mln::util::tree\_\-node}$<$ T $>$::{\bf tree\_\-node} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_ad2a7ec62feeb64edec37b2e49ea2b520}


Constructor. 



Definition at line 345 of file tree.hh.

\hypertarget{a00415_ab1854875fa55a63c27ce6979d8a87370}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!tree\_\-node@{tree\_\-node}}
\index{tree\_\-node@{tree\_\-node}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{tree\_\-node}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf mln::util::tree\_\-node}$<$ T $>$::{\bf tree\_\-node} (
\begin{DoxyParamCaption}
\item[{T}]{ elt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_ab1854875fa55a63c27ce6979d8a87370}


Constructor. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em elt}]The element of \hyperlink{a00415}{tree\_\-node}. \end{DoxyParams}


Definition at line 352 of file tree.hh.



\subsection{Member Function Documentation}
\hypertarget{a00415_afc0778eaefac17a8c559f2878af2e2da}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!add\_\-child@{add\_\-child}}
\index{add\_\-child@{add\_\-child}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{add\_\-child}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf tree\_\-node}$<$ T $>$ $\ast$ {\bf mln::util::tree\_\-node}$<$ T $>$::add\_\-child (
\begin{DoxyParamCaption}
\item[{T}]{ elt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_afc0778eaefac17a8c559f2878af2e2da}


Create a \hyperlink{a00415}{tree\_\-node} with {\ttfamily elt} which become the child of the current \hyperlink{a00415}{tree\_\-node}. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em elt}]The element of the new child to add.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The new \hyperlink{a00415}{tree\_\-node} created. 
\end{DoxyReturn}


Definition at line 394 of file tree.hh.

\hypertarget{a00415_a4aa76396b58a0fcd63059ca8ad3dcbc3}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!add\_\-child@{add\_\-child}}
\index{add\_\-child@{add\_\-child}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{add\_\-child}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf tree\_\-node}$<$ T $>$ $\ast$ {\bf mln::util::tree\_\-node}$<$ T $>$::add\_\-child (
\begin{DoxyParamCaption}
\item[{{\bf tree\_\-node}$<$ T $>$ $\ast$}]{ tree\_\-node}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_a4aa76396b58a0fcd63059ca8ad3dcbc3}


Bind {\ttfamily \hyperlink{a00415}{tree\_\-node}} to the current \hyperlink{a00415}{tree\_\-node} and become its child. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em \hyperlink{a00415}{tree\_\-node}}]The new child \hyperlink{a00415}{tree\_\-node}.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The child \hyperlink{a00415}{tree\_\-node}. 
\end{DoxyReturn}


Definition at line 407 of file tree.hh.



References mln::util::tree\_\-node$<$ T $>$::children(), and mln::util::tree\_\-node$<$ T $>$::parent().

\hypertarget{a00415_ab8701dcfa8c3764596800fa3afe5264e}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!check\_\-consistency@{check\_\-consistency}}
\index{check\_\-consistency@{check\_\-consistency}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{check\_\-consistency}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ bool {\bf mln::util::tree\_\-node}$<$ T $>$::check\_\-consistency (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_ab8701dcfa8c3764596800fa3afe5264e}


Check the consistency of the \hyperlink{a00415}{tree\_\-node}. 

\begin{DoxyReturn}{Returns}
true if no error, else false. 
\end{DoxyReturn}


Definition at line 519 of file tree.hh.

\hypertarget{a00415_a2c341d4bbd052294517c3b25fc783831}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!children@{children}}
\index{children@{children}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{children}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ const std::vector$<$ {\bf tree\_\-node}$<$ T $>$ $\ast$ $>$ \& {\bf mln::util::tree\_\-node}$<$ T $>$::children (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_a2c341d4bbd052294517c3b25fc783831}


The getter of the children. 

\begin{DoxyReturn}{Returns}
The children of the \hyperlink{a00415}{tree\_\-node} in const. 
\end{DoxyReturn}


Definition at line 386 of file tree.hh.

\hypertarget{a00415_a0bebf364502d552386049609b87be5fe}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!children@{children}}
\index{children@{children}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{children}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ std::vector$<$ {\bf tree\_\-node}$<$ T $>$ $\ast$ $>$ \& {\bf mln::util::tree\_\-node}$<$ T $>$::children (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_a0bebf364502d552386049609b87be5fe}


The getter of the children. 

\begin{DoxyReturn}{Returns}
The children of the \hyperlink{a00415}{tree\_\-node}. 
\end{DoxyReturn}


Definition at line 378 of file tree.hh.



Referenced by mln::util::tree\_\-node$<$ T $>$::add\_\-child(), and mln::util::tree$<$ T $>$::add\_\-tree\_\-up().

\hypertarget{a00415_a5a21bb13dce0d67bf0fcac9fa5ea8a3b}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!delete\_\-tree\_\-node@{delete\_\-tree\_\-node}}
\index{delete\_\-tree\_\-node@{delete\_\-tree\_\-node}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{delete\_\-tree\_\-node}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf tree\_\-node}$<$ T $>$ $\ast$ {\bf mln::util::tree\_\-node}$<$ T $>$::delete\_\-tree\_\-node (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_a5a21bb13dce0d67bf0fcac9fa5ea8a3b}


Delete the current \hyperlink{a00415}{tree\_\-node}. 



Definition at line 427 of file tree.hh.

\hypertarget{a00415_a947ea3cb4a7487e25460e09537832850}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!elt@{elt}}
\index{elt@{elt}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{elt}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ const T \& {\bf mln::util::tree\_\-node}$<$ T $>$::elt (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_a947ea3cb4a7487e25460e09537832850}


The const getter of the element. 

\begin{DoxyReturn}{Returns}
The element of the \hyperlink{a00415}{tree\_\-node} in const. 
\end{DoxyReturn}


Definition at line 361 of file tree.hh.

\hypertarget{a00415_a7185b19b58aa184d54580c8482b755c6}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!elt@{elt}}
\index{elt@{elt}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{elt}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ T \& {\bf mln::util::tree\_\-node}$<$ T $>$::elt (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_a7185b19b58aa184d54580c8482b755c6}


The getter of the element. 

\begin{DoxyReturn}{Returns}
The element of the \hyperlink{a00415}{tree\_\-node}. 
\end{DoxyReturn}


Definition at line 369 of file tree.hh.



Referenced by mln::util::tree\_\-node$<$ T $>$::print().

\hypertarget{a00415_aca717bc335cc044ec6afffe5f9ffbbd4}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!parent@{parent}}
\index{parent@{parent}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{parent}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf tree\_\-node}$<$ T $>$ $\ast$ {\bf mln::util::tree\_\-node}$<$ T $>$::parent (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_aca717bc335cc044ec6afffe5f9ffbbd4}


The getter of the parent. 

\begin{DoxyReturn}{Returns}
The parent of the \hyperlink{a00415}{tree\_\-node}. 
\end{DoxyReturn}


Definition at line 477 of file tree.hh.



Referenced by mln::util::tree\_\-node$<$ T $>$::add\_\-child(), mln::util::branch\_\-iter\_\-ind$<$ T $>$::deepness(), and mln::util::branch\_\-iter$<$ T $>$::deepness().

\hypertarget{a00415_aa5e8de667ed405c042d8fd5686bd32ab}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!print@{print}}
\index{print@{print}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{print}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf mln::util::tree\_\-node}$<$ T $>$::print (
\begin{DoxyParamCaption}
\item[{std::ostream \&}]{ ostr, }
\item[{int}]{ level = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_aa5e8de667ed405c042d8fd5686bd32ab}


Print on {\ttfamily ostr} the arborescence with the current \hyperlink{a00415}{tree\_\-node} as root. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em ostr}]The output stream. \item[\mbox{\tt[in]} {\em level}]The deep level \end{DoxyParams}


Definition at line 449 of file tree.hh.



References mln::util::tree\_\-node$<$ T $>$::elt().

\hypertarget{a00415_abd861da673332ee1f2289e4970507cf4}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!search@{search}}
\index{search@{search}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{search}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf tree\_\-node}$<$ T $>$ $\ast$ {\bf mln::util::tree\_\-node}$<$ T $>$::search (
\begin{DoxyParamCaption}
\item[{T \&}]{ elt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_abd861da673332ee1f2289e4970507cf4}


Search the \hyperlink{a00415}{tree\_\-node} with value {\ttfamily elt} in the arborescence of the current \hyperlink{a00415}{tree\_\-node}. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em elt}]The value of the searched \hyperlink{a00415}{tree\_\-node}.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
If not found 0 else the \hyperlink{a00415}{tree\_\-node} with {\ttfamily elt} value. 
\end{DoxyReturn}


Definition at line 507 of file tree.hh.



References mln::util::tree\_\-node$<$ T $>$::search\_\-rec().

\hypertarget{a00415_a0af129ce038cf8ae8aebbee394df6d18}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!search\_\-rec@{search\_\-rec}}
\index{search\_\-rec@{search\_\-rec}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{search\_\-rec}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ int {\bf mln::util::tree\_\-node}$<$ T $>$::search\_\-rec (
\begin{DoxyParamCaption}
\item[{{\bf tree\_\-node}$<$ T $>$ $\ast$$\ast$}]{ res, }
\item[{T \&}]{ elt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_a0af129ce038cf8ae8aebbee394df6d18}


The using method for method search. 



Definition at line 485 of file tree.hh.



Referenced by mln::util::tree\_\-node$<$ T $>$::search().

\hypertarget{a00415_a75629e82b0e7f30b010146cd8fad332f}{
\index{mln::util::tree\_\-node@{mln::util::tree\_\-node}!set\_\-parent@{set\_\-parent}}
\index{set\_\-parent@{set\_\-parent}!mln::util::tree_node@{mln::util::tree\_\-node}}
\subsubsection[{set\_\-parent}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf mln::util::tree\_\-node}$<$ T $>$::set\_\-parent (
\begin{DoxyParamCaption}
\item[{{\bf tree\_\-node}$<$ T $>$ $\ast$}]{ parent}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/dd6/a00415_a75629e82b0e7f30b010146cd8fad332f}


Bind {\ttfamily \hyperlink{a00415}{tree\_\-node}} to the current \hyperlink{a00415}{tree\_\-node} and become its parent. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em parent}]The new parent \hyperlink{a00415}{tree\_\-node}. \end{DoxyParams}


Definition at line 467 of file tree.hh.

