Struct spatial::tree::mbr::MbrMap
[−]
[src]
pub struct MbrMap<P, DIM, LG, I, R, T> where DIM: ArrayLength<P> + ArrayLength<(P, P)>, I: IndexInsert<P, DIM, LG, T>, R: IndexRemove<P, DIM, LG, T, I> {
// some fields omitted
}
The generic container interface for spatial maps. Will, at the very least, be able to support R, R+, R*, and X trees
Methods
impl<P, DIM, LG, I, R, T> MbrMap<P, DIM, LG, I, R, T> where P: Float + Signed + Bounded + MulAssign + AddAssign + ToPrimitive + FromPrimitive + Copy + Debug + Default, DIM: ArrayLength<P> + ArrayLength<(P, P)> + Clone, LG: MbrLeafGeometry<P, DIM>, I: IndexInsert<P, DIM, LG, T>, R: IndexRemove<P, DIM, LG, T, I>
[src]
fn new(insert_index: I, remove_index: R) -> MbrMap<P, DIM, LG, I, R, T>
Create a new MbrMap with the given insert and remove indexes
fn insert(&mut self, geometry: LG, item: T)
Insert an item
fn remove<Q: MbrQuery<P, DIM, LG, T>>(&mut self, query: Q) -> Vec<(LG, T)>
Remove all items whose shapes are accepted by the query. Returns removed entries.
fn retain<Q: MbrQuery<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
fn is_empty(&self) -> bool
Whether the map is empty
fn len(&self) -> usize
Length of the map
fn clear(&mut self)
Clear the map
fn iter(&self) -> Iter<P, DIM, LG, T, MbrRectQuery<P, DIM>>
Iter for the map
fn iter_mut(&self) -> IterMut<P, DIM, LG, T, MbrRectQuery<P, DIM>>
IterMut for the map
fn iter_query<Q: MbrQuery<P, DIM, LG, T>>(&self, query: Q) -> Iter<P, DIM, LG, T, Q>
Iter for the map with a given query
fn iter_query_mut<Q: MbrQuery<P, DIM, LG, T>>(&self, query: Q) -> IterMut<P, DIM, LG, T, Q>
IterMut for the map with a given query