Closed Roland-djee closed 2 years ago
Hi @Roland-djee,
The short answer is no. Index calculation is always done on-the-fly from the root node (the node you are indexing from). Nodes cannot have "absolute" indexes since the they are relative to the root node you pick. But I suppose we can add a method like binarytree.Node.get_index_from_root(other)
that would either return -1 or raise an error if other
is not an ancestor, else calculate and return the index.
Thanks !
Hello,
A quick question if that is the place to ask, is it possible to access the index of an individual node ?
I can't seem to find an easy way to do that.
Thanks !