[][src]Trait alga::general::AbstractMagma

pub trait AbstractMagma<O: Operator>: Sized + Clone {
    fn operate(&self, right: &Self) -> Self;

    fn op(&self, _: O, lhs: &Self) -> Self { ... }
}

A magma is an algebraic structure which consists of a set equipped with a binary operation, ∘, which must be closed.

Closed binary operation

a, b ∈ Self ⇒ a ∘ b ∈ Self

Required methods

fn operate(&self, right: &Self) -> Self

Performs an operation.

Loading content...

Provided methods

fn op(&self, _: O, lhs: &Self) -> Self

Performs specific operation.

Loading content...

Implementations on Foreign Types

impl AbstractMagma<Additive> for u8[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for u16[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for u32[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for u64[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for usize[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for i8[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for i16[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for i32[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for i64[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for isize[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for f32[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Additive> for f64[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for u8[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for u16[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for u32[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for u64[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for usize[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for i8[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for i16[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for i32[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for i64[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for isize[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for f32[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl AbstractMagma<Multiplicative> for f64[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl<N: AbstractMagma<Additive>> AbstractMagma<Additive> for Complex<N>[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

impl<N: Num + Clone> AbstractMagma<Multiplicative> for Complex<N>[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

Loading content...

Implementors

impl<O: Operator> AbstractMagma<O> for Id<O>[src]

fn op(&self, _: O, lhs: &Self) -> Self[src]

Loading content...