Milena (Olena)  User documentation 2.0a Id
 All Classes Namespaces Functions Variables Typedefs Enumerator Groups Pages
mln::util::tree< T > Class Template Reference

Class of generic tree. More...

#include <tree.hh>

Public Member Functions

void add_tree_down (T &elt)
 Bind a new tree downer the current.
 
void add_tree_up (T &elt)
 Bind a new tree upper the current.
 
bool check_consistency ()
 Check the consistency of the tree.
 
branch< T > main_branch ()
 Convert the tree into brach.
 
tree_node< T > * root ()
 The getter of the root.
 
 tree ()
 Constructor.
 
 tree (tree_node< T > *root)
 Constructor.
 

Detailed Description

template<typename T>
class mln::util::tree< T >

Class of generic tree.

Definition at line 187 of file tree.hh.

Constructor & Destructor Documentation

template<typename T >
tree< T >::tree ( )
inline

Constructor.

Definition at line 285 of file tree.hh.

template<typename T >
tree< T >::tree ( tree_node< T > *  root)
inline

Constructor.

Parameters
[in]rootThe root of the tree.

Definition at line 292 of file tree.hh.

Member Function Documentation

template<typename T >
void tree< T >::add_tree_down ( T &  elt)
inline

Bind a new tree downer the current.

Parameters
[in]eltThe new value of the new tree_node of the new tree add downer the current.

Definition at line 328 of file tree.hh.

template<typename T >
void tree< T >::add_tree_up ( T &  elt)
inline

Bind a new tree upper the current.

Parameters
[in]eltThe new value of the new tree_node of the new tree add upper the current.

Definition at line 317 of file tree.hh.

References mln::util::tree_node< T >::children(), and mln::util::tree_node< T >::set_parent().

template<typename T >
bool tree< T >::check_consistency ( )
inline

Check the consistency of the tree.

Returns
true if no error, else false.

Definition at line 338 of file tree.hh.

template<typename T >
branch< T > tree< T >::main_branch ( )
inline

Convert the tree into brach.

Returns
The root's tree_node of the the current tree.

Definition at line 309 of file tree.hh.

template<typename T >
tree_node< T > * tree< T >::root ( )
inline

The getter of the root.

Returns
The root's tree_node of the the current tree.

Definition at line 301 of file tree.hh.

Referenced by mln::util::display_tree(), and mln::util::tree_to_fast().