[][src]Trait abstalg::Field

pub trait Field: EuclideanDomain {
    fn inv(&self, elem: &Self::Elem) -> Self::Elem;

    fn div(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem { ... }
}

A field is a commutative ring with identity where each non-zero element has a multiplicative inverse. Typical examples are the real, complex and rational numbers, and finite fields constructed from an Euclidean domain and one of its irreducible elements. All fields are Euclidean domains themselves, with a rather trivial structure.

Required methods

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.

Loading content...

Provided methods

fn div(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem

Returns the quotient of the two elements in the field. This method panics if the second element is zero.

Loading content...

Implementors

impl<E> Field for ApproxFloats<E> where
    E: Float + Debug + Zero + One
[src]

impl<R: EuclideanDomain> Field for QuotientField<R>[src]

Loading content...