pub struct Segtree<M>where
M: Monoid,{ /* private fields */ }
Implementations§
Source§impl<M: Monoid> Segtree<M>
impl<M: Monoid> Segtree<M>
pub fn set(&mut self, p: usize, x: M::S)
pub fn get(&self, p: usize) -> M::S
pub fn get_slice(&self) -> &[M::S]
pub fn prod<R>(&self, range: R) -> M::Swhere
R: RangeBounds<usize>,
pub fn all_prod(&self) -> M::S
pub fn max_right<F>(&self, l: usize, f: F) -> usize
pub fn min_left<F>(&self, r: usize, f: F) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<M> Freeze for Segtree<M>
impl<M> RefUnwindSafe for Segtree<M>
impl<M> Send for Segtree<M>
impl<M> Sync for Segtree<M>
impl<M> Unpin for Segtree<M>
impl<M> UnwindSafe for Segtree<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