Struct abstalg::TwoElementAlgebra
source · [−]pub struct TwoElementAlgebra();
Trait Implementations
sourceimpl AbelianGroup for TwoElementAlgebra
impl AbelianGroup for TwoElementAlgebra
sourcefn is_zero(&self, elem: &Self::Elem) -> bool
fn is_zero(&self, elem: &Self::Elem) -> bool
Checks if the given element is the additive identity of the ring.
sourcefn neg_assign(&self, _elem: &mut Self::Elem)
fn neg_assign(&self, _elem: &mut Self::Elem)
The element is changed to its additive inverse.
sourcefn add(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem
fn add(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem
The additive sum of the given elements
sourcefn add_assign(&self, elem1: &mut Self::Elem, elem2: &Self::Elem)
fn add_assign(&self, elem1: &mut Self::Elem, elem2: &Self::Elem)
The second element is added to the first one.
sourcefn sub(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem
fn sub(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem
The difference of the given elements.
sourcefn sub_assign(&self, elem1: &mut Self::Elem, elem2: &Self::Elem)
fn sub_assign(&self, elem1: &mut Self::Elem, elem2: &Self::Elem)
The second element is subtracted from the first one.
sourceimpl BooleanAlgebra for TwoElementAlgebra
impl BooleanAlgebra for TwoElementAlgebra
sourceimpl BoundedOrder for TwoElementAlgebra
impl BoundedOrder for TwoElementAlgebra
sourceimpl Clone for TwoElementAlgebra
impl Clone for TwoElementAlgebra
sourcefn clone(&self) -> TwoElementAlgebra
fn clone(&self) -> TwoElementAlgebra
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TwoElementAlgebra
impl Debug for TwoElementAlgebra
sourceimpl Domain for TwoElementAlgebra
impl Domain for TwoElementAlgebra
sourceimpl Field for TwoElementAlgebra
impl Field for TwoElementAlgebra
sourcefn inv(&self, elem: &Self::Elem) -> Self::Elem
fn inv(&self, elem: &Self::Elem) -> Self::Elem
Returns the multiplicative inverse of the given non-zero element. This method panics for the zero element. Read more
sourceimpl Lattice for TwoElementAlgebra
impl Lattice for TwoElementAlgebra
sourceimpl Monoid for TwoElementAlgebra
impl Monoid for TwoElementAlgebra
sourcefn is_one(&self, elem: &Self::Elem) -> bool
fn is_one(&self, elem: &Self::Elem) -> bool
Checks if the given element is the multiplicative identity.
sourcefn try_inv(&self, elem: &Self::Elem) -> Option<Self::Elem>
fn try_inv(&self, elem: &Self::Elem) -> Option<Self::Elem>
Calculates the multiplicative inverse of the given element if it exists.
sourcefn invertible(&self, elem: &Self::Elem) -> bool
fn invertible(&self, elem: &Self::Elem) -> bool
Returns true if the given element has a multiplicative inverse.
sourceimpl PartialOrder for TwoElementAlgebra
impl PartialOrder for TwoElementAlgebra
sourcefn leq(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> bool
fn leq(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> bool
Returns true if the first element is less than or equal to the second one in the partial order. Read more
sourceimpl Semigroup for TwoElementAlgebra
impl Semigroup for TwoElementAlgebra
sourceimpl UnitaryRing for TwoElementAlgebra
impl UnitaryRing for TwoElementAlgebra
impl DistributiveLattice for TwoElementAlgebra
Auto Trait Implementations
impl RefUnwindSafe for TwoElementAlgebra
impl Send for TwoElementAlgebra
impl Sync for TwoElementAlgebra
impl Unpin for TwoElementAlgebra
impl UnwindSafe for TwoElementAlgebra
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more