Struct broccoli::container::TreeIndBase[][src]

pub struct TreeIndBase<'a, N: Num, T> { /* fields omitted */ }
Expand description

This is a Vec<BBox<N,&'a mut T>> under the hood with the added guarentee that all the &'a mut T point to the same slice.

From this struct a user can create a TreeInd.

Implementations

Create a TreeIndBase.

Examples

 let mut aabbs = [
    broccoli::bbox(broccoli::rect(0isize, 10, 0, 10), 0),
 ];

 let mut base=broccoli::container::TreeIndBase::new(&mut aabbs,|a|a.rect);
 let mut tree = base.build();

Extra the internals of a TreeIndBase.

Examples

 let mut aabbs = [
    broccoli::bbox(broccoli::rect(0isize, 10, 0, 10), 0),
 ];

 let mut base=broccoli::container::TreeIndBase::new(&mut aabbs,|a|a.rect);
 let mut inner=base.into_inner();
 let mut tree = broccoli::new(&mut inner);
 //We can make a tree using the internals, but we lost the guarentee
 //that all the `&'a mut T` belong to the same slice.

Build a TreeInd.

Examples

 let mut aabbs = [
    broccoli::bbox(broccoli::rect(0isize, 10, 0, 10), 0),
 ];

 let mut base=broccoli::container::TreeIndBase::new(&mut aabbs,|a|a.rect);
 let mut tree = base.build();

Build a TreeInd.

Examples

 let mut aabbs = [
    broccoli::bbox(broccoli::rect(0isize, 10, 0, 10), 0),
 ];

 let mut base=broccoli::container::TreeIndBase::new(&mut aabbs,|a|a.rect);
 let mut tree = base.build_par(broccoli::par::RayonJoin);

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

Performs the conversion.

Performs the conversion.

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.