logo
pub struct Node<'a, T: Aabb> {
    pub range: AabbPin<&'a mut [T]>,
    pub cont: Range<T::Num>,
    pub div: Option<T::Num>,
    pub num_elem: usize,
}

Fields

range: AabbPin<&'a mut [T]>

May or may not be sorted.

cont: Range<T::Num>

if range is empty, then value is [default,default]. if range is not empty, then cont is the min max bounds in on the y axis (if the node belongs to the x axis).

div: Option<T::Num>

for non leafs: if there is a bot either in this node or in a child node, then div is some.

for leafs: value is none

num_elem: usize

The minimum number of elements in a child node. If the left child has 500 bots, and the right child has 20, then this value will be 20.

This is used to determine when to start a parallel task. Starting a parallel task has overhead so we only want to split one off if we know that both threads have a decent amount of work to perform in parallel.

Implementations

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.