tree.hh
tree.hh copied to clipboard
An STL-like C++ header-only tree library
Hi, I try to create a tree in an iterative way: I start with one head node and then make a loop for the depth of the tree. In each...
I try to merge two tree together but I'm not sure i properly understood what it says in the doc. for instance with the siblings of the first level of...
The doc says that for the tree: ``` root | +----A | | | +---B | | | +---C | +----D | +---E | +---F ``` The resulting order in...
This commit contains only code style changes and does not change any functionality
It appears that `head` and `feet` nodes has a `data` member which is not initialized in the case where tree is templated on primitives. In some cases those data seems...
When i try to use the fixed_depth iteration i am running into issues. First of all this assertion always blocks my code from running: **assert(1==0); // FIXME: not correct yet:...
Is it possible to use this library with a custom algorithm like A*, minmax, etc? Or is one forced to use pre-order, etc.? Thank you
There is some rudimentary functionality to print trees in `kptree::print_tree_bracketed`, but it would be nice to have an import functionality as well (reading that bracketed format or perhaps the trees...
The lowest_common_ancestor currently supports two iterators. It might be nice to have a version which takes multiple iterators, e.g. a vector or set or range.
The `lowest_common_ancestor` function fails to spot when one node is the parent of the other.