pub trait Monoid {
    type Val: Clone;

    // Required methods
    fn id() -> Self::Val;
    fn op(left: &Self::Val, right: &Self::Val) -> Self::Val;
}
Expand description

モノイド

Required Associated Types§

source

type Val: Clone

データの型 ($S$)

Required Methods§

source

fn id() -> Self::Val

単位元 ($\varnothing \to S$)

source

fn op(left: &Self::Val, right: &Self::Val) -> Self::Val

演算 ($S \times S \to S$)

Implementations on Foreign Types§

source§

impl Monoid for ()

§

type Val = ()

source§

fn id() -> Self::Val

source§

fn op(_: &Self::Val, _: &Self::Val) -> Self::Val

Implementors§

source§

impl Monoid for Add<f64>

§

type Val = f64

source§

impl Monoid for Add<isize>

§

type Val = isize

source§

impl Monoid for Add<usize>

§

type Val = usize

source§

impl Monoid for Add<M107>

§

type Val = Modint<MOD107>

source§

impl Monoid for Add<M998>

§

type Val = Modint<MOD998>

source§

impl Monoid for Xor

§

type Val = usize

source§

impl<T> Monoid for GCD<T>

§

type Val = usize

source§

impl<T> Monoid for Affine<T>where T: Clone + Debug, Affine<T>: AffineTransform<T>,

§

type Val = (T, T)

source§

impl<T: One + Clone> Monoid for Mul<T>

§

type Val = T

source§

impl<T: Ord + Bounded + Clone> Monoid for Indexed<Max<T>>

§

type Val = (T, usize)

source§

impl<T: Ord + Bounded + Clone> Monoid for Indexed<Min<T>>

§

type Val = (T, usize)

source§

impl<T: Ord + Bounded + Clone> Monoid for Max<T>

§

type Val = T

source§

impl<T: Ord + Bounded + Clone> Monoid for Min<T>

§

type Val = T

source§

impl<T: Ord + Bounded + Clone> Monoid for MinMax<T>

§

type Val = (T, T)