pub struct MbrMap<NODE, I, R> { /* private fields */ }
Expand description
The generic container interface for spatial maps. Will, at the very least, be able to support R, R+, R*, and X trees
Implementations§
source§impl<P: FP, const DIM: usize, LG, I, R, T> MbrMap<RTreeNode<P, DIM, LG, T>, I, R>where
LG: MbrLeafGeometry<P, DIM>,
I: IndexInsert<P, DIM, LG, T, RTreeNode<P, DIM, LG, T>>,
R: IndexRemove<P, DIM, LG, T, RTreeNode<P, DIM, LG, T>, I>,
impl<P: FP, const DIM: usize, LG, I, R, T> MbrMap<RTreeNode<P, DIM, LG, T>, I, R>where
LG: MbrLeafGeometry<P, DIM>,
I: IndexInsert<P, DIM, LG, T, RTreeNode<P, DIM, LG, T>>,
R: IndexRemove<P, DIM, LG, T, RTreeNode<P, DIM, LG, T>, I>,
sourcepub fn new(
insert_index: I,
remove_index: R
) -> MbrMap<RTreeNode<P, DIM, LG, T>, I, R>
pub fn new( insert_index: I, remove_index: R ) -> MbrMap<RTreeNode<P, DIM, LG, T>, I, R>
Create a new MbrMap with the given insert and remove indexes
sourcepub fn remove<Q: MbrQuery<P, DIM, LG, T, RTreeNode<P, DIM, LG, T>>>(
&mut self,
query: Q
) -> Vec<(LG, T)>
pub fn remove<Q: MbrQuery<P, DIM, LG, T, RTreeNode<P, DIM, LG, T>>>( &mut self, query: Q ) -> Vec<(LG, T)>
Remove all items whose shapes are accepted by the query. Returns removed entries.
sourcepub fn retain<Q: MbrQuery<P, DIM, LG, T, RTreeNode<P, DIM, LG, T>>, F: FnMut(&T) -> bool>(
&mut self,
query: Q,
f: F
) -> Vec<(LG, T)>
pub fn retain<Q: MbrQuery<P, DIM, LG, T, RTreeNode<P, DIM, LG, T>>, F: FnMut(&T) -> bool>( &mut self, query: Q, f: F ) -> Vec<(LG, T)>
Remove all items whose shapes are accepted by the query and where f(&T) returns false. Returns removed entries
sourcepub fn iter(&self) -> Iter<'_, P, DIM, LG, T, MbrRectQuery<P, DIM>> ⓘ
pub fn iter(&self) -> Iter<'_, P, DIM, LG, T, MbrRectQuery<P, DIM>> ⓘ
Iter for the map
sourcepub fn iter_mut(&mut self) -> IterMut<'_, P, DIM, LG, T, MbrRectQuery<P, DIM>> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, P, DIM, LG, T, MbrRectQuery<P, DIM>> ⓘ
IterMut for the map
Auto Trait Implementations§
impl<NODE, I, R> Freeze for MbrMap<NODE, I, R>
impl<NODE, I, R> RefUnwindSafe for MbrMap<NODE, I, R>
impl<NODE, I, R> Send for MbrMap<NODE, I, R>
impl<NODE, I, R> Sync for MbrMap<NODE, I, R>
impl<NODE, I, R> Unpin for MbrMap<NODE, I, R>
impl<NODE, I, R> UnwindSafe for MbrMap<NODE, I, R>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more