Struct nekolib::ds::IntervalMap
source · pub struct IntervalMap<K, V> { /* private fields */ }
Expand description
Implementations§
source§impl<K: Ord + Clone, V: Eq + Clone> IntervalMap<K, V>
impl<K: Ord + Clone, V: Eq + Clone> IntervalMap<K, V>
sourcepub fn insert<B: RangeBounds<K>>(&mut self, b: B, v: V)
pub fn insert<B: RangeBounds<K>>(&mut self, b: B, v: V)
区間 b
中の各 $k$ に対して $S\xleftarrow{\cup} (k\mapsto v)$ で更新する。
sourcepub fn remove<B: RangeBounds<K>>(&mut self, b: B) -> Vec<(Interval<K>, V)>
pub fn remove<B: RangeBounds<K>>(&mut self, b: B) -> Vec<(Interval<K>, V)>
区間 b
中の各 $k$ に対して $S\xleftarrow{\setminus} (k\mapsto\bullet)$
で更新する。
sourcepub fn superset_of<B: RangeBounds<K>>(&self, b: B) -> Option<(&Interval<K>, &V)>
pub fn superset_of<B: RangeBounds<K>>(&self, b: B) -> Option<(&Interval<K>, &V)>
$T\subseteq S$ かつ b
を含む $T$ があれば、その $T$
および対応する値を返す。
pub fn iter( &self ) -> impl Iterator<Item = (&Interval<K>, &V)> + DoubleEndedIterator + '_
Trait Implementations§
source§impl<K: Clone, V: Clone> Clone for IntervalMap<K, V>
impl<K: Clone, V: Clone> Clone for IntervalMap<K, V>
source§fn clone(&self) -> IntervalMap<K, V>
fn clone(&self) -> IntervalMap<K, V>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, K: Ord, V: Eq> IntoIterator for &'a IntervalMap<K, V>
impl<'a, K: Ord, V: Eq> IntoIterator for &'a IntervalMap<K, V>
source§impl<K: Ord, V: Eq> IntoIterator for IntervalMap<K, V>
impl<K: Ord, V: Eq> IntoIterator for IntervalMap<K, V>
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for IntervalMap<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,
impl<K, V> Send for IntervalMap<K, V>where K: Send, V: Send,
impl<K, V> Sync for IntervalMap<K, V>where K: Sync, V: Sync,
impl<K, V> Unpin for IntervalMap<K, V>
impl<K, V> UnwindSafe for IntervalMap<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more