pub struct LazySegmentTreeMap<M>{ /* private fields */ }
Implementations§
Source§impl<M> LazySegmentTreeMap<M>
impl<M> LazySegmentTreeMap<M>
pub fn new(n: usize) -> Self
pub fn update<R>(&mut self, range: R, x: M::Act)where
R: RangeBounds<usize>,
Sourcepub fn fold<R>(&mut self, range: R) -> M::Aggwhere
R: RangeBounds<usize>,
pub fn fold<R>(&mut self, range: R) -> M::Aggwhere
R: RangeBounds<usize>,
pub fn set(&mut self, k: usize, x: M::Agg)
pub fn get(&mut self, k: usize) -> M::Agg
pub fn fold_all(&mut self) -> M::Agg
Sourcepub fn position_acc<R, P>(&mut self, range: R, p: P) -> Option<usize>
pub fn position_acc<R, P>(&mut self, range: R, p: P) -> Option<usize>
Returns the first index that satisfies a accumlative predicate.
Sourcepub fn rposition_acc<R, P>(&mut self, range: R, p: P) -> Option<usize>
pub fn rposition_acc<R, P>(&mut self, range: R, p: P) -> Option<usize>
Returns the last index that satisfies a accumlative predicate.
Trait Implementations§
Source§impl<M> Clone for LazySegmentTreeMap<M>
impl<M> Clone for LazySegmentTreeMap<M>
Auto Trait Implementations§
impl<M> Freeze for LazySegmentTreeMap<M>
impl<M> RefUnwindSafe for LazySegmentTreeMap<M>
impl<M> Send for LazySegmentTreeMap<M>
impl<M> Sync for LazySegmentTreeMap<M>
impl<M> Unpin for LazySegmentTreeMap<M>
impl<M> UnwindSafe for LazySegmentTreeMap<M>
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