[][src]Module dinotree::tree

Contains generic code using both all dinotree versions

Structs

NodeRef

Reference to a node in the dinotree.

NodeRefMut

Mutable reference to a node in the dinotree.

SplitterEmpty

For cases where you don't care about any of the callbacks that Splitter provides, this implements them all to do nothing.

Vistr

Tree Iterator that returns a reference to each node.

VistrMut

Tree Iterator that returns a mutable reference to each node.

Enums

BinStrat

Passed to the binning algorithm to determine if the binning algorithm should check for index out of bounds.

Traits

DinoTreeRefMutTrait

The mutable part of the tree accessing trait.

DinoTreeRefTrait

The trait through which dinotree algorithms may use the tree. We expose a trait so that both the copy and non copy version of the tree have the same interface.

Splitter

A trait that gives the user callbacks at events in a recursive algorithm on the tree. The main motivation behind this trait was to track the time spent taken at each level of the tree during construction.

Functions

assert_invariants

Returns false if the tree's invariants are not met.

compute_default_level_switch_sequential

Returns the height at which the recursive construction algorithm turns to sequential from parallel.

compute_tree_height_heuristic

Returns the height of a dyn tree for a given number of bots. The height is chosen such that the nodes will each have a small amount of bots. If we had a node per bot, the tree would be too big. If we had too many bots per node, you would lose the properties of a tree, and end up with plain sweep and prune. This is provided so that users can allocate enough space for all the nodes before the tree is constructed, perhaps for some graphics buffer.

compute_tree_height_heuristic_debug

Outputs the height given an desirned number of bots per node.

default_level_switch_sequential

Returns the height at which the recursive construction algorithm turns to sequential from parallel.