Trait ActedMonoid

Source
pub trait ActedMonoid {
    type Val: Clone + PartialEq;
    type Act: Clone + PartialEq;

    // Required methods
    fn e() -> Self::Val;
    fn id() -> Self::Act;
    fn op(x: &Self::Val, y: &Self::Val) -> Self::Val;
    fn mapping(x: &Self::Val, y: &Self::Act) -> Self::Val;
    fn compose(x: &Self::Act, y: &Self::Act) -> Self::Act;
}
Expand description

作用付きモノイド

Required Associated Types§

Source

type Val: Clone + PartialEq

要素のデータ型

Source

type Act: Clone + PartialEq

作用素のデータ型

Required Methods§

Source

fn e() -> Self::Val

要素Xの単位元を返す

Source

fn id() -> Self::Act

作用素Fの単位元を返す

Source

fn op(x: &Self::Val, y: &Self::Val) -> Self::Val

要素同士の演算

Source

fn mapping(x: &Self::Val, y: &Self::Act) -> Self::Val

要素に対する作用

Source

fn compose(x: &Self::Act, y: &Self::Act) -> Self::Act

作用素同士の演算

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<M> ActedMonoid for ToActed<M>
where M: Monoid, M::Val: PartialEq,

Source§

type Val = <M as Monoid>::Val

Source§

type Act = ()

Source§

impl<T> ActedMonoid for AffineSum<T>
where T: Add<Output = T> + Mul<Output = T> + Zero + One + Copy + PartialEq + Mul<usize, Output = T>,

Source§

impl<T> ActedMonoid for AffineUpdateComposite<T>
where T: Add<Output = T> + Mul<Output = T> + Zero + One + Copy + PartialEq,

Source§

impl<T> ActedMonoid for AddMax<T>
where T: Zero + Clone + Add<Output = T> + Ord + Bounded,

Source§

type Val = T

Source§

type Act = T

Source§

impl<T> ActedMonoid for AddMin<T>
where T: Zero + Clone + Add<Output = T> + Ord + Bounded,

Source§

type Val = T

Source§

type Act = T

Source§

impl<T> ActedMonoid for AddSum<T>
where T: Zero + Clone + Add<Output = T> + Mul<Output = T> + FromPrimitive + PartialEq,

Source§

type Val = (T, usize)

Source§

type Act = T

Source§

impl<T> ActedMonoid for ArithSum<T>
where T: Zero + Clone + Add<Output = T> + Mul<Output = T> + FromPrimitive + PartialEq,

Source§

impl<T> ActedMonoid for UpdateSum<T>
where T: Zero + Clone + Add<Output = T> + Mul<Output = T> + FromPrimitive + PartialEq,

Source§

type Val = (T, usize)

Source§

type Act = Option<T>

Source§

impl<T: Ord + Bounded + Clone> ActedMonoid for UpdateMinMax<T>

Source§

impl<T: Bounded + Ord + Clone> ActedMonoid for UpdateMax<T>

Source§

type Val = T

Source§

type Act = T

Source§

impl<T: Bounded + Ord + Clone> ActedMonoid for UpdateMin<T>

Source§

type Val = T

Source§

type Act = T