Struct bio::data_structures::interval_tree::IntervalTree
source · [−]Expand description
An interval tree for storing intervals with data
Implementations
sourceimpl<N: Clone + Ord, D> IntervalTree<N, D>
impl<N: Clone + Ord, D> IntervalTree<N, D>
sourcepub fn insert<I: Into<Interval<N>>>(&mut self, interval: I, data: D)
pub fn insert<I: Into<Interval<N>>>(&mut self, interval: I, data: D)
Inserts an Interval
into the tree and associates it with data
sourcepub fn find<I: Into<Interval<N>>>(
&self,
interval: I
) -> IntervalTreeIterator<'_, N, D>ⓘNotable traits for IntervalTreeIterator<'a, N, D>impl<'a, N: Ord + Clone + 'a, D: 'a> Iterator for IntervalTreeIterator<'a, N, D> type Item = Entry<'a, N, D>;
pub fn find<I: Into<Interval<N>>>(
&self,
interval: I
) -> IntervalTreeIterator<'_, N, D>ⓘNotable traits for IntervalTreeIterator<'a, N, D>impl<'a, N: Ord + Clone + 'a, D: 'a> Iterator for IntervalTreeIterator<'a, N, D> type Item = Entry<'a, N, D>;
Uses the provided Interval
to find overlapping intervals in the tree and returns an
IntervalTreeIterator
sourcepub fn find_mut<I: Into<Interval<N>>>(
&mut self,
interval: I
) -> IntervalTreeIteratorMut<'_, N, D>ⓘNotable traits for IntervalTreeIteratorMut<'a, N, D>impl<'a, N: Ord + Clone + 'a, D: 'a> Iterator for IntervalTreeIteratorMut<'a, N, D> type Item = EntryMut<'a, N, D>;
pub fn find_mut<I: Into<Interval<N>>>(
&mut self,
interval: I
) -> IntervalTreeIteratorMut<'_, N, D>ⓘNotable traits for IntervalTreeIteratorMut<'a, N, D>impl<'a, N: Ord + Clone + 'a, D: 'a> Iterator for IntervalTreeIteratorMut<'a, N, D> type Item = EntryMut<'a, N, D>;
Uses the provided Interval
to find overlapping intervals in the tree and returns an
IntervalTreeIteratorMut
that allows mutable access to the data
Trait Implementations
sourceimpl<N: Clone + Ord + Clone, D: Clone> Clone for IntervalTree<N, D>
impl<N: Clone + Ord + Clone, D: Clone> Clone for IntervalTree<N, D>
sourcefn clone(&self) -> IntervalTree<N, D>
fn clone(&self) -> IntervalTree<N, D>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<N: Ord + Clone, D> Default for IntervalTree<N, D>
impl<N: Ord + Clone, D> Default for IntervalTree<N, D>
sourceimpl<'de, N: Ord + Clone, D> Deserialize<'de> for IntervalTree<N, D> where
N: Deserialize<'de>,
D: Deserialize<'de>,
impl<'de, N: Ord + Clone, D> Deserialize<'de> for IntervalTree<N, D> where
N: Deserialize<'de>,
D: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<N: Clone + Ord, D, R: Into<Interval<N>>> FromIterator<(R, D)> for IntervalTree<N, D>
impl<N: Clone + Ord, D, R: Into<Interval<N>>> FromIterator<(R, D)> for IntervalTree<N, D>
Auto Trait Implementations
impl<N, D> RefUnwindSafe for IntervalTree<N, D> where
D: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, D> Send for IntervalTree<N, D> where
D: Send,
N: Send,
impl<N, D> Sync for IntervalTree<N, D> where
D: Sync,
N: Sync,
impl<N, D> Unpin for IntervalTree<N, D> where
D: Unpin,
N: Unpin,
impl<N, D> UnwindSafe for IntervalTree<N, D> where
D: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more