pub struct NoditSet<I, K> { /* private fields */ }
Expand description
An ordered set of non-overlapping intervals based on NoditMap
.
I
is the generic type parameter for the Ord
type the K
type is interval over.
K
is the generic type parameter for the interval implementing type
in the set.
Phrasing it another way: I
is the point type and K
is the interval type.
See NoditMap
for more details.
Implementations§
source§impl<I, K> NoditSet<I, K>where
I: PointType,
K: IntervalType<I>,
impl<I, K> NoditSet<I, K>where
I: PointType,
K: IntervalType<I>,
sourcepub fn overlaps<Q>(&self, interval: Q) -> boolwhere
Q: IntervalType<I>,
pub fn overlaps<Q>(&self, interval: Q) -> boolwhere
Q: IntervalType<I>,
See NoditMap::overlaps()
for more details.
sourcepub fn overlapping<Q>(&self, interval: Q) -> impl DoubleEndedIterator<Item = &K>where
Q: IntervalType<I>,
pub fn overlapping<Q>(&self, interval: Q) -> impl DoubleEndedIterator<Item = &K>where
Q: IntervalType<I>,
See NoditMap::overlapping()
for more details.
sourcepub fn get_at_point(&self, point: I) -> Result<&K, K>
pub fn get_at_point(&self, point: I) -> Result<&K, K>
See NoditMap::get_key_value_at_point()
for more details.
sourcepub fn contains_point(&self, point: I) -> bool
pub fn contains_point(&self, point: I) -> bool
See NoditMap::contains_point()
for more details.
sourcepub fn remove_overlapping<'a, Q>(
&'a mut self,
interval: Q
) -> impl Iterator<Item = K>where
Q: IntervalType<I> + 'a,
pub fn remove_overlapping<'a, Q>(
&'a mut self,
interval: Q
) -> impl Iterator<Item = K>where
Q: IntervalType<I> + 'a,
See NoditMap::remove_overlapping()
for more details.
sourcepub fn cut<'a, Q>(&'a mut self, interval: Q) -> impl Iterator<Item = K>where
Q: IntervalType<I> + 'a,
pub fn cut<'a, Q>(&'a mut self, interval: Q) -> impl Iterator<Item = K>where
Q: IntervalType<I> + 'a,
See NoditMap::cut()
for more details.
sourcepub fn gaps_untrimmed<'a, Q>(
&'a self,
interval: Q
) -> impl Iterator<Item = K> + '_where
Q: IntervalType<I> + 'a,
pub fn gaps_untrimmed<'a, Q>(
&'a self,
interval: Q
) -> impl Iterator<Item = K> + '_where
Q: IntervalType<I> + 'a,
See NoditMap::gaps_untrimmed()
for more details.
sourcepub fn gaps_trimmed<'a, Q>(
&'a self,
interval: Q
) -> impl Iterator<Item = K> + '_where
Q: IntervalType<I> + 'a,
pub fn gaps_trimmed<'a, Q>(
&'a self,
interval: Q
) -> impl Iterator<Item = K> + '_where
Q: IntervalType<I> + 'a,
See NoditMap::gaps_trimmed()
for more details.
sourcepub fn contains_interval<Q>(&self, interval: Q) -> boolwhere
Q: IntervalType<I>,
pub fn contains_interval<Q>(&self, interval: Q) -> boolwhere
Q: IntervalType<I>,
See NoditMap::contains_interval()
for more details.
sourcepub fn insert_strict(&mut self, interval: K) -> Result<(), OverlapError<()>>
pub fn insert_strict(&mut self, interval: K) -> Result<(), OverlapError<()>>
See NoditMap::insert_strict()
for more details.
sourcepub fn insert_merge_touching(
&mut self,
interval: K
) -> Result<K, OverlapError<()>>
pub fn insert_merge_touching( &mut self, interval: K ) -> Result<K, OverlapError<()>>
See NoditMap::insert_merge_touching()
for more details.
sourcepub fn insert_merge_overlapping(&mut self, interval: K) -> K
pub fn insert_merge_overlapping(&mut self, interval: K) -> K
See NoditMap::insert_merge_overlapping()
for more details.
sourcepub fn insert_merge_touching_or_overlapping(&mut self, interval: K) -> K
pub fn insert_merge_touching_or_overlapping(&mut self, interval: K) -> K
See NoditMap::insert_merge_touching_or_overlapping()
for more details.
sourcepub fn insert_overwrite(&mut self, interval: K) -> impl Iterator<Item = K>
pub fn insert_overwrite(&mut self, interval: K) -> impl Iterator<Item = K>
See NoditMap::insert_overwrite()
for more details.
sourcepub fn from_slice_strict<const N: usize>(
slice: [K; N]
) -> Result<NoditSet<I, K>, OverlapError<()>>
pub fn from_slice_strict<const N: usize>( slice: [K; N] ) -> Result<NoditSet<I, K>, OverlapError<()>>
See NoditMap::from_slice_strict()
for more details.
sourcepub fn from_iter_strict(
iter: impl Iterator<Item = K>
) -> Result<NoditSet<I, K>, OverlapError<()>>
pub fn from_iter_strict( iter: impl Iterator<Item = K> ) -> Result<NoditSet<I, K>, OverlapError<()>>
See NoditMap::from_iter_strict()
for more details.
source§impl<I, K> NoditSet<I, K>
impl<I, K> NoditSet<I, K>
sourcepub fn new() -> Self
pub fn new() -> Self
See NoditMap::new()
for more details.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
See NoditMap::len()
for more details.
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
See NoditMap::is_empty()
for more details.
sourcepub fn iter(&self) -> impl DoubleEndedIterator<Item = &K>
pub fn iter(&self) -> impl DoubleEndedIterator<Item = &K>
See NoditMap::iter()
for more details.
sourcepub fn first(&self) -> Option<&K>
pub fn first(&self) -> Option<&K>
See NoditMap::first_key_value()
for more details.
sourcepub fn last(&self) -> Option<&K>
pub fn last(&self) -> Option<&K>
See NoditMap::last_key_value()
for more details.