tree.hh icon indicating copy to clipboard operation
tree.hh copied to clipboard

An STL-like C++ header-only tree library

Results 12 tree.hh issues
Sort by recently updated
recently updated
newest added

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...

bug

The doc says that for the tree: ``` root | +----A | | | +---B | | | +---C | +----D | +---E | +---F ``` The resulting order in...

bug

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...

bug

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:...

enhancement
how to (question)

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

enhancement

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...

enhancement

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.

enhancement

The `lowest_common_ancestor` function fails to spot when one node is the parent of the other.

bug