Documentation ¶
Index ¶
- func Children(n uint64) (left uint64, right uint64, exists bool)
- func Count(n uint64) uint64
- func Depth(n uint64) uint64
- func FullRoots(index uint64) (roots []uint64, err error)
- func Index(depth, offset uint64) uint64
- func LeftChild(n uint64) (uint64, bool)
- func LeftSpan(n uint64) uint64
- func NewIterator(index uint64) *iterator
- func Offset(n uint64) uint64
- func Parent(n uint64) uint64
- func RightChild(n uint64) (uint64, bool)
- func RightSpan(n uint64) uint64
- func Sibling(n uint64) uint64
- func Spans(n uint64) (left uint64, right uint64)
- func Uncle(n uint64) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Children ¶
Children returns the children of the provided node, if it exists Returns the children and a bool indicating if they exist
func Count ¶ added in v1.0.1
Count returns the number of nodes under the given node, including the provided node itself
func FullRoots ¶ added in v1.0.1
FullRoots returns a list of all roots less than the provided index A root is a subtrees where all nodes have either 2 or 0 children
func LeftChild ¶ added in v1.0.1
LeftChild returns the left child of the provided node, if it exists Returns the left child and a bool indicating if it exists
func LeftSpan ¶ added in v1.0.1
LeftSpan returns the left most node in the tree which the provided node spans
func NewIterator ¶ added in v1.0.1
func NewIterator(index uint64) *iterator
NewIterator will construct a new iterator at the designated position
func Offset ¶
Offset returns the offset of a given node The offset is the distance from the left edge of the tree
func RightChild ¶ added in v1.0.1
RightChild returns the left child of the provided node, if it exists Returns the right child and a bool indicating if it exists
func RightSpan ¶ added in v1.0.1
RightSpan returns the right most node in the tree which the provided node spans
Types ¶
This section is empty.