[−][src]Struct nclist::NClist
Methods
impl<T> NClist<T> where
T: Interval,
[src]
T: Interval,
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]
&'a self,
r: &'a Range<T::Coord>
) -> OrderedOverlaps<'a, T>
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]
T: Interval,
impl<T> Into<Vec<T>> for NClist<T> where
T: Interval,
[src]
T: Interval,
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]
T: Interval,
Auto Trait Implementations
impl<T> RefUnwindSafe for NClist<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for NClist<T> where
T: Send,
T: Send,
impl<T> Sync for NClist<T> where
T: Sync,
T: Sync,
impl<T> Unpin for NClist<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for NClist<T> where
T: UnwindSafe,
T: UnwindSafe,
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>,