Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tree attribute: topological height #192

Closed
PerretB opened this issue Apr 28, 2020 · 0 comments · Fixed by #194
Closed

Add tree attribute: topological height #192

PerretB opened this issue Apr 28, 2020 · 0 comments · Fixed by #194
Labels
feature request Feature request

Comments

@PerretB
Copy link
Member

PerretB commented Apr 28, 2020

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant