Struct competitive_programming_rs::data_structure::lazy_segment_tree::lazy_segment_tree::LazySegmentTree
source · [−]pub struct LazySegmentTree<S, Op, E, F, Mapping, Composition, Id> { /* private fields */ }
Implementations
sourceimpl<S, Op, E, F, Mapping, Composition, Id> LazySegmentTree<S, Op, E, F, Mapping, Composition, Id> where
S: Clone,
E: Fn() -> S,
F: Clone,
Op: Fn(&S, &S) -> S,
Mapping: Fn(&F, &S) -> S,
Composition: Fn(&F, &F) -> F,
Id: Fn() -> F,
impl<S, Op, E, F, Mapping, Composition, Id> LazySegmentTree<S, Op, E, F, Mapping, Composition, Id> where
S: Clone,
E: Fn() -> S,
F: Clone,
Op: Fn(&S, &S) -> S,
Mapping: Fn(&F, &S) -> S,
Composition: Fn(&F, &F) -> F,
Id: Fn() -> F,
pub fn new(
n: usize,
e: E,
op: Op,
mapping: Mapping,
composition: Composition,
id: Id
) -> Self
pub fn set(&mut self, index: usize, value: S)
pub fn get(&mut self, index: usize) -> S
pub fn prod(&mut self, range: Range<usize>) -> S
pub fn all_prod(&self) -> S
pub fn apply(&mut self, index: usize, f: F)
pub fn apply_range(&mut self, range: Range<usize>, f: F)
Auto Trait Implementations
impl<S, Op, E, F, Mapping, Composition, Id> RefUnwindSafe for LazySegmentTree<S, Op, E, F, Mapping, Composition, Id> where
Composition: RefUnwindSafe,
E: RefUnwindSafe,
F: RefUnwindSafe,
Id: RefUnwindSafe,
Mapping: RefUnwindSafe,
Op: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, Op, E, F, Mapping, Composition, Id> Send for LazySegmentTree<S, Op, E, F, Mapping, Composition, Id> where
Composition: Send,
E: Send,
F: Send,
Id: Send,
Mapping: Send,
Op: Send,
S: Send,
impl<S, Op, E, F, Mapping, Composition, Id> Sync for LazySegmentTree<S, Op, E, F, Mapping, Composition, Id> where
Composition: Sync,
E: Sync,
F: Sync,
Id: Sync,
Mapping: Sync,
Op: Sync,
S: Sync,
impl<S, Op, E, F, Mapping, Composition, Id> Unpin for LazySegmentTree<S, Op, E, F, Mapping, Composition, Id> where
Composition: Unpin,
E: Unpin,
F: Unpin,
Id: Unpin,
Mapping: Unpin,
Op: Unpin,
S: Unpin,
impl<S, Op, E, F, Mapping, Composition, Id> UnwindSafe for LazySegmentTree<S, Op, E, F, Mapping, Composition, Id> where
Composition: UnwindSafe,
E: UnwindSafe,
F: UnwindSafe,
Id: UnwindSafe,
Mapping: UnwindSafe,
Op: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more