[][src]Module broccoli::analyze

Contains code to help analyze the Tree structure. Only used to measure the performance of the structure.

Structs

NotSorted

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.

TreeBuilder

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.

TreePreBuilder

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.

Enums

BinStrat

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

Constants

DEFAULT_NUMBER_ELEM_PER_NODE

The default number of elements per node

Traits

NaiveCheck

Functions that panic if a disconnect between query results is detected between broccoli::Tree and the naive equivalent.

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

default_axis

Returns the default axis type.

Type Definitions

DefaultA

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