Add tree attribute: topological height
PerretB opened this issue · comments
For a given node n
, its topological height is defined as the number of edges on the longest path from the node to a leaf.
new_altitudes = hg.accumulate_and_add_sequential(tree, np.ones(tree.num_vertices()), np.zeros(tree.num_leaves()), hg.Accumulators.max)