pub trait Act<M: Monoid> {
type Monoid: Monoid<Element = Self::Element>;
type Element;
// Required methods
fn monoid(&self) -> &Self::Monoid;
fn act(
&self,
m: &M,
val: M::Element,
a: Self::Element,
n: usize,
) -> M::Element;
// Provided methods
fn act_one(&self, m: &M, val: M::Element, a: Self::Element) -> M::Element { ... }
fn op(&self, a: Self::Element, b: Self::Element) -> Self::Element { ... }
fn id(&self) -> Self::Element { ... }
}Expand description
モノイド作用