Skip to main content

Fold

Trait Fold 

Source
pub trait Fold<R: RangeBounds<usize>> {
    type Output: Monoid;

    // Required method
    fn fold(&self, r: R) -> <Self::Output as Magma>::Set;
}
Expand description

区間和を求める。

Required Associated Types§

Required Methods§

Source

fn fold(&self, r: R) -> <Self::Output as Magma>::Set

r で指定される区間の和を返す。

Implementors§

Source§

impl<A, B> Fold<B> for VecActSegtree<A>
where A: MonoidAction, <A::Operator as Magma>::Set: Clone, <A::Operand as Magma>::Set: Clone, B: RangeBounds<usize>,

Source§

impl<M, B> Fold<B> for DisjointSparseTable<M>
where M: Monoid, M::Set: Clone, B: RangeBounds<usize>,

Source§

impl<M, B> Fold<B> for VecSegtree<M>
where M: Monoid, M::Set: Clone, B: RangeBounds<usize>,

Source§

impl<M: Monoid> Fold<RangeFull> for FoldableDeque<M>
where M::Set: Clone,

Source§

impl<M: Monoid> Fold<RangeFull> for FoldableQueue<M>
where M::Set: Clone,