Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Add height method body for Sparse Node #59

Closed
bvrooman opened this issue Jan 10, 2022 · 0 comments · Fixed by #64
Closed

Add height method body for Sparse Node #59

bvrooman opened this issue Jan 10, 2022 · 0 comments · Fixed by #64
Assignees

Comments

@bvrooman
Copy link
Contributor

bvrooman commented Jan 10, 2022

The PR #55 adds a height method to the common::Node trait. This method is required to return the height of the node in the tree. When retrieving the path from a root to a leaf, the instruction set is read from the leaf bits starting at the index corresponding to the root height. The root node reports its height to the iterator.

The Sparse::Node struct implements common::Node and must therefore implement the height method. Currently, the struct does not store its height or have any way of calculating it. Therefore, we must store the height of the node in the node buffer and expose it through a height method.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant