![]() |
Libftpp
A modern C++ library
|
Node structure for an n-ary tree. More...
#include <n_ary_tree.hpp>
Public Member Functions | |
| Node (TType value) | |
| void | addChild (const TType &child) |
| Node< TType > * | setParentFunct (std::function< TType(std::vector< TType >)> func) |
Public Attributes | |
| TType | data |
| std::vector< std::unique_ptr< Node< TType > > > | _children |
| std::function< TType(std::vector< TType >)> | parentFunct |
Node structure for an n-ary tree.
Each node contains data and pointers to its children.
Definition at line 15 of file n_ary_tree.hpp.
Definition at line 21 of file n_ary_tree.hpp.
|
inline |
Definition at line 23 of file n_ary_tree.hpp.
References Node< TType >::_children.
|
inline |
Definition at line 28 of file n_ary_tree.hpp.
References Node< TType >::parentFunct.
Definition at line 19 of file n_ary_tree.hpp.
Referenced by Node< TType >::addChild(), NAryTree< TType >::addChild(), NAryTree< TType >::postorder(), NAryTree< TType >::postorderCompute(), and NAryTree< TType >::preorder().
| TType Node< TType >::data |
Definition at line 18 of file n_ary_tree.hpp.
Referenced by NAryTree< TType >::postorder(), NAryTree< TType >::postorderCompute(), and NAryTree< TType >::preorder().
| std::function<TType(std::vector<TType>)> Node< TType >::parentFunct |
Definition at line 20 of file n_ary_tree.hpp.
Referenced by NAryTree< TType >::postorderCompute(), and Node< TType >::setParentFunct().