[−][src]Struct dinotree::DinoTreeBuilder
Builder for a DinoTree
Examples
use axgeom; use dinotree_sample::SampleBuilder; use dinotree::DinoTreeBuilder; let builder = SampleBuilder::new(); let mut bots:Vec<_>= builder.build().take(1000).collect(); let mut tree=DinoTreeBuilder::new(axgeom::XAXISS,&mut bots,|a|builder.create_aabb(a)).build_seq();
Methods
impl<'a, A: AxisTrait, T: Copy, Num: NumTrait, F: FnMut(&T) -> Rect<Num>> DinoTreeBuilder<'a, A, T, Num, F>
[src]
impl<'a, A: AxisTrait, T: Copy, Num: NumTrait, F: FnMut(&T) -> Rect<Num>> DinoTreeBuilder<'a, A, T, Num, F>
pub fn new(axis: A, bots: &[T], aabb_create: F) -> DinoTreeBuilder<A, T, Num, F> | [src] |
Create a dinotree builder. The user picks the axis along which the first divider will partition. If for example the user picks the x axis, then the first divider will be a line from top to bottom. The user also passes a function to create the bounding box of each bot in the slice passed.
ⓘImportant traits for &'_ mut I
ⓘImportant traits for &'_ mut I
pub fn with_bin_strat(&mut self, strat: BinStrat) -> &mut Self | [src] |
Choose a custom bin stratagy.
ⓘImportant traits for &'_ mut I
ⓘImportant traits for &'_ mut I
pub fn with_height(&mut self, height: usize) -> &mut Self | [src] |
Choose a custom height for the tree.
ⓘImportant traits for &'_ mut I
ⓘImportant traits for &'_ mut I
pub fn with_height_switch_seq(&mut self, height: usize) -> &mut Self | [src] |
Choose the height at which to switch from parallel to sequential. If you end up building sequentially, this argument is ignored.
pub fn build_with_splitter_seq<S: Splitter>( | [src] |
Build with a Splitter.
pub fn build_not_sorted_with_splitter_seq<S: Splitter>( | [src] |
Build a not sorted dinotree with a splitter.
pub fn build_seq(&mut self) -> DinoTree<A, BBox<Num, T>> | [src] |
Build sequentially.
pub fn build_par(&mut self) -> DinoTree<A, BBox<Num, T>> | [src] |
Build in parallel
pub fn build_not_sorted_seq(&mut self) -> NotSorted<A, BBox<Num, T>> | [src] |
Build not sorted sequentially
pub fn build_not_sorted_par(&mut self) -> NotSorted<A, BBox<Num, T>> | [src] |
Build not sorted in parallel
Auto Trait Implementations
impl<'a, A, T, Num, F> Send for DinoTreeBuilder<'a, A, T, Num, F> where
F: Send,
T: Sync,
impl<'a, A, T, Num, F> Send for DinoTreeBuilder<'a, A, T, Num, F> where
F: Send,
T: Sync,
impl<'a, A, T, Num, F> Sync for DinoTreeBuilder<'a, A, T, Num, F> where
F: Sync,
T: Sync,
impl<'a, A, T, Num, F> Sync for DinoTreeBuilder<'a, A, T, Num, F> where
F: Sync,
T: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'_ mut I
ⓘImportant traits for &'_ mut I
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,