[go: up one dir, main page]

Trait Ring

Source
pub trait Ring:
    RingApprox
    + GroupAbelian<Additive>
    + Monoid<Multiplicative> {
    // Provided method
    fn prop_mul_and_add_are_distributive_approx(
        args: (Self, Self, Self),
    ) -> bool { ... }
}
Expand description

A ring is the combination of an abelian group and a multiplicative monoid structure.

A ring is equipped with:

  • An addition operator + that fulfills the constraints of an abelian group.
  • A multiplication operator × that fulfills the constraints of a monoid.

Provided Methods§

Source

fn prop_mul_and_add_are_distributive_approx(args: (Self, Self, Self)) -> bool

Returns true if the multiplication and addition operators are distributive for the given argument tuple.

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.

Implementations on Foreign Types§

Source§

impl Ring for i8

Source§

impl Ring for i16

Source§

impl Ring for i32

Source§

impl Ring for i64

Implementors§