[−][src]Struct coitrees::SortedQuerent
An alternative query strategy that can be much faster when queries are performed in sorted order and overlap.
Unilke COITree::query
, some state is retained between queries.
SortedQuerent
tracks that state. If queries are not sorted or don't
overlap, this strategy still works, but is slightly slower than
COITree::query
.
Implementations
impl<'a, T, I> SortedQuerent<'a, T, I> where
T: Clone,
I: IntWithMax,
[src]
T: Clone,
I: IntWithMax,
pub fn new(tree: &'a COITree<T, I>) -> SortedQuerent<'a, T, I>
[src]
Construct a new SortedQuerent
to perform a sequence. queries.
pub fn query<F>(&mut self, first: i32, last: i32, visit: F) where
F: FnMut(&IntervalNode<T, I>),
[src]
F: FnMut(&IntervalNode<T, I>),
Find intervals in the underlying COITree
that overlap the query
[first, last]
and call visit
on each. Works equivalently to
COITrees::query
but queries that overlap prior queries will potentially
be faster.
Auto Trait Implementations
impl<'a, T, I> RefUnwindSafe for SortedQuerent<'a, T, I> where
I: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, I> Send for SortedQuerent<'a, T, I> where
I: Sync,
T: Sync,
I: Sync,
T: Sync,
impl<'a, T, I> Sync for SortedQuerent<'a, T, I> where
I: Sync,
T: Sync,
I: Sync,
T: Sync,
impl<'a, T, I> Unpin for SortedQuerent<'a, T, I>
impl<'a, T, I> UnwindSafe for SortedQuerent<'a, T, I> where
I: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,