Trait alga::general::AbstractRingCommutative

source ·
pub trait AbstractRingCommutative<A: Operator = Additive, M: Operator = Multiplicative>: AbstractRing<A, M> {
    // Provided methods
    fn prop_mul_is_commutative_approx(args: (Self, Self)) -> bool
       where Self: RelativeEq { ... }
    fn prop_mul_is_commutative(args: (Self, Self)) -> bool
       where Self: Eq { ... }
}
Expand description

A ring with a commutative multiplication.

A commutative ring is a set with two binary operations: a closed commutative and associative with the divisibility property and an identity element, and another closed associative and commutative with the divisibility property and an identity element.

§Commutativity

∀ a, b ∈ Self, a × b = b × a

Provided Methods§

source

fn prop_mul_is_commutative_approx(args: (Self, Self)) -> bool
where Self: RelativeEq,

Returns true if the multiplication operator is commutative for the given argument tuple. Approximate equality is used for verifications.

source

fn prop_mul_is_commutative(args: (Self, Self)) -> bool
where Self: Eq,

Returns true if the multiplication operator is commutative for the given argument tuple.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AbstractRingCommutative for f32

source§

impl AbstractRingCommutative for f64

source§

impl AbstractRingCommutative for i8

source§

impl AbstractRingCommutative for i16

source§

impl AbstractRingCommutative for i32

source§

impl AbstractRingCommutative for i64

source§

impl AbstractRingCommutative for i128

source§

impl AbstractRingCommutative for isize

source§

impl<N: Num + Clone + ClosedNeg + AbstractRingCommutative> AbstractRingCommutative for Complex<N>

Implementors§