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 subtree iteration #34

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Add subtree iteration #34

merged 1 commit into from
Oct 31, 2023

Conversation

JayKickliter
Copy link
Owner

This PR introduces HexTreeMap::subtree_iter(cell) which returns an iterator that visiting:

  1. Nothing if the target cell isn't a parent or leaf in the map
  2. Target cell only, if it is a leaf in the tree
  3. Any cells in in the map which are descendants of cell

This subtree iteration is useful for aggregating, extracting, or folding over cell/value pairs in a hextree.

@JayKickliter JayKickliter merged commit e6923d6 into main Oct 31, 2023
2 checks passed
@JayKickliter JayKickliter deleted the jsk/subtree-iter branch October 31, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant