Trait alga::general::AbstractMonoid
source · pub trait AbstractMonoid<O: Operator>: AbstractSemigroup<O> + Identity<O> {
// Provided methods
fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> bool
where Self: RelativeEq { ... }
fn prop_operating_identity_element_is_noop(args: (Self,)) -> bool
where Self: Eq { ... }
}
Expand description
A monoid is a semigroup equipped with an identity element, e.
A set equipped with a closed associative binary operation with the divisibility property and an identity element.
§Identity element
∃ e ∈ Self, ∀ a ∈ Self, e ∘ a = a ∘ e = a
Provided Methods§
sourcefn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> boolwhere
Self: RelativeEq,
fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> boolwhere
Self: RelativeEq,
Checks whether operating with the identity element is a no-op for the given argument. Approximate equality is used for verifications.
sourcefn prop_operating_identity_element_is_noop(args: (Self,)) -> boolwhere
Self: Eq,
fn prop_operating_identity_element_is_noop(args: (Self,)) -> boolwhere
Self: Eq,
Checks whether operating with the identity element is a no-op for the given argument.
Object Safety§
This trait is not object safe.