[][src]Struct nclist::NClist

pub struct NClist<T> where
    T: Interval
{ /* fields omitted */ }

Methods

impl<T> NClist<T> where
    T: Interval
[src]

pub fn from_vec(v: Vec<T>) -> Result<NClist<T>, &'static str>[src]

pub fn count_overlaps(&self, r: &Range<T::Coord>) -> usize[src]

Count the number of elements overlapping the Range r. Counting overlaps is slightly faster than iterating over the overlaps. This method is preferred when only the number of overlapping elements is required.

Important traits for Overlaps<'a, T>
pub fn overlaps<'a>(&'a self, r: &'a Range<T::Coord>) -> Overlaps<'a, T>[src]

Returns an iterator that returns overlapping elements to query r. During iteration contained intervals are pushed to a queue an processed in order after yielding the non-overlapping regions.

Important traits for OrderedOverlaps<'a, T>
pub fn overlaps_ordered<'a>(
    &'a self,
    r: &'a Range<T::Coord>
) -> OrderedOverlaps<'a, T>
[src]

Returns an iterator that returns overlapping elements to query r ordered by start coordinate. This is less efficient that returning without ordering, but doesn't require allocating storage for all overlapping elements.

pub fn into_vec(self) -> Vec<T>[src]

Return the intervals Vec. This will run without allocation and return the intervals in a different order then provided.

Trait Implementations

impl<T: Debug> Debug for NClist<T> where
    T: Interval
[src]

impl<T> Into<Vec<T>> for NClist<T> where
    T: Interval
[src]

Return the intervals Vec. This will run without allocation and return the intervals in a different order then provided.

impl<T> TryFrom<Vec<T>> for NClist<T> where
    T: Interval
[src]

type Error = &'static str

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<T> RefUnwindSafe for NClist<T> where
    T: RefUnwindSafe

impl<T> Send for NClist<T> where
    T: Send

impl<T> Sync for NClist<T> where
    T: Sync

impl<T> Unpin for NClist<T> where
    T: Unpin

impl<T> UnwindSafe for NClist<T> where
    T: UnwindSafe

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.