logo
Expand description

This is a supporting crate to the broccoli crate. This crate only provides the broccoli tree and tree building code, but no querying code.

Re-exports

pub use axgeom;

Modules

Provides a mutable pointer type that is more restrictive that &mut T, in order to protect invariants.

Tree building blocks

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.

Tree building functions that allow arbitrary code to be run every time the problem is split into two and built back together. Useful for debuging/measuring performance.

Utility functions

Structs

The main tree struct

Owned version of Tree

Traits

Abstract over containers that produce &mut [T]

Expose a common Sorter trait so that we may have two version of the tree where one implementation actually does sort the tree, while the other one does nothing when sort() is called.

Functions

Shorthand constructor of BBox

Shorthand constructor of BBoxMut

Returns the default axis type.

Create a Tree.

Convenience function to create a Rect.

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.

TreeInner type with default node and sorter.