Trait nekolib::traits::fold::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>,

§

type Output = M

source§

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

§

type Output = M

source§

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

§

type Output = M

source§

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

§

type Output = M