[][src]Struct coitrees::SortedQuerent

pub struct SortedQuerent<'a, T, I> where
    T: Clone,
    I: IntWithMax
{ /* fields omitted */ }

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]

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]

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

impl<'a, T, I> Send for SortedQuerent<'a, T, I> where
    I: Sync,
    T: Sync

impl<'a, T, I> Sync for SortedQuerent<'a, T, I> where
    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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.