pub trait MonoidAction {
    type Operator: Monoid;
    type Operand: Monoid;

    // Required methods
    fn operator(&self) -> &Self::Operator;
    fn operand(&self) -> &Self::Operand;
    fn act(
        &self,
        x: <Self::Operand as Magma>::Set,
        op: <Self::Operator as Magma>::Set
    ) -> <Self::Operand as Magma>::Set;
}
Expand description

作用モノイド。

Required Associated Types§

source

type Operator: Monoid

作用を行う型。

source

type Operand: Monoid

作用される型。

Required Methods§

source

fn operator(&self) -> &Self::Operator

source

fn operand(&self) -> &Self::Operand

source

fn act( &self, x: <Self::Operand as Magma>::Set, op: <Self::Operator as Magma>::Set ) -> <Self::Operand as Magma>::Set

作用を行う。

Implementors§

source§

impl<T> MonoidAction for OpAddOnOpAddCount<T>where T: Ord + Eq + Clone + Add<Output = T> + AddAssoc + Mul<Output = T> + Zero + Sized,

source§

impl<T> MonoidAction for OpAffineOnOpAddCount<T>where T: Ord + Eq + Clone + Add<Output = T> + AddAssoc + Mul<Output = T> + Zero + One + Sized,

source§

impl<T, OpT, IdT, U, OpU, IdU, Act> MonoidAction for OpClosureOnOpClosure<T, OpT, IdT, U, OpU, IdU, Act>where T: Eq + Sized, OpT: Fn(T, T) -> T, IdT: Fn() -> T, U: Eq + Sized, OpU: Fn(U, U) -> U, IdU: Fn() -> U, Act: Fn(T, U) -> T,

§

type Operand = OpClosure<T, OpT, IdT>

§

type Operator = OpClosure<U, OpU, IdU>

source§

impl<T: Ord + Eq + Add<Output = T> + AddAssoc + Zero + Max + Sized> MonoidAction for OpAddOnOpMin<T>

§

type Operand = OpMin<T>

§

type Operator = OpAdd<T>

source§

impl<T: Ord + Eq + Add<Output = T> + AddAssoc + Zero + Min + Sized> MonoidAction for OpAddOnOpMax<T>

§

type Operand = OpMax<T>

§

type Operator = OpAdd<T>