logo
pub struct Tree<'a, T: Aabb> { /* private fields */ }
Expand description

A broccoli Tree.

Implementations

panics if a broken broccoli tree invariant is detected. For debugging purposes only.

If the top 25% of tree levels has more elements than the bottom 75%, consider the tree not good for querying without a considerable jump in computation cost.

If worst case n*n time is unacceptable for your usecase, consider calling this after tree construction. If the tree is degenerate, consider just handling a subset of all colliding pairs by using the colliding pair building blocks in queries::colfind::build

Store tree data such as the number of elements per node, as well as the bounding range for each node.

Create a Tree using stored treedata and the original list of elements in the same order.

Use this function if you want to store a constructed tree outside of lifetimes.

It is the user responsibility to feed this function the same distribution of aabbs in the same order as the distribution that was used in the original tree from which Tree::get_tree_data() was called. Not doing so will make an invalid tree with no error notification.

Consider calling Tree::assert_tree_invariants() after tree construction if you don’t know if it was the same distribution which will atleast tell you if the distribution makes a valid tree.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.