pub struct PersistentSegtree<M: Monoid> { /* private fields */ }Expand description
永続セグメントツリー
Implementations§
Source§impl<M: Monoid + Clone> PersistentSegtree<M>
impl<M: Monoid + Clone> PersistentSegtree<M>
Sourcepub fn new(monoid: M, n: usize) -> Self
pub fn new(monoid: M, n: usize) -> Self
長さnのPersistentSegtreeを生成する。
Sourcepub fn fold(&self, range: impl RangeBounds<usize>) -> M::Element
pub fn fold(&self, range: impl RangeBounds<usize>) -> M::Element
範囲rangeで計算を集約して返す。
Trait Implementations§
Source§impl<M: Clone + Monoid> Clone for PersistentSegtree<M>
impl<M: Clone + Monoid> Clone for PersistentSegtree<M>
Source§fn clone(&self) -> PersistentSegtree<M>
fn clone(&self) -> PersistentSegtree<M>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<M> Freeze for PersistentSegtree<M>where
M: Freeze,
impl<M> RefUnwindSafe for PersistentSegtree<M>
impl<M> !Send for PersistentSegtree<M>
impl<M> !Sync for PersistentSegtree<M>
impl<M> Unpin for PersistentSegtree<M>where
M: Unpin,
impl<M> UnwindSafe for PersistentSegtree<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