Module broccoli::build[][src]

Expand description

Contains code to help build the Tree structure with more options than just using broccoli::new.

Structs

A version of Tree where the elements are not sorted along each axis, like a KD Tree. For comparison, a normal kd-tree is provided by NotSorted. In this tree, the elements are not sorted along an axis at each level. Construction of NotSorted is faster than Tree since it does not have to sort bots that belong to each node along an axis. But most query algorithms can usually take advantage of this extra property to be faster.

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

Builder pattern for Tree. For most usecases, the user is suggested to use the built in new() functions to create the tree. This is provided in cases the user wants more control on the behavior of the tree for benching and debuging purposes.

Using this struct the user can determine the height of a tree or the number of nodes that would exist if the tree were constructed with the specified number of elements.

Constants

The default number of elements per node

Traits

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

Returns the default axis type.

Type Definitions

The default starting axis of a Tree. It is set to be the X axis. This means that the first divider is a ‘vertical’ line since it is partitioning space based off of the aabb’s X value.