pub trait EuclideanDomain: IntegralDomain {
    fn quo_rem(
        &self,
        elem1: &Self::Elem,
        elem2: &Self::Elem
    ) -> (Self::Elem, Self::Elem); fn quo(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem { ... } fn rem(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem { ... } fn reduced(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> bool { ... } fn gcd(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem { ... } fn lcm(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> Self::Elem { ... } fn extended_gcd(
        &self,
        elem1: &Self::Elem,
        elem2: &Self::Elem
    ) -> (Self::Elem, Self::Elem, Self::Elem) { ... } fn relative_primes(&self, elem1: &Self::Elem, elem2: &Self::Elem) -> bool { ... } }
Expand description

An Euclidean domain is an integral domain where the Euclidean algorithm can be implemented. Typical examples are the rings of integers and polynomials.

Required Methods

Performs the euclidean division algorithm dividing the first elem with the second one and returning the quotient and the remainder. This method panics if the second element is zero (because there is no unique solution)

Provided Methods

Performs the division just like the quo_rem method would do and returns the quotient. This method panics if the second element is zero.

Performs the division just like the quo_rem method would do and returns the remainder. This method panics if the second element is zero.

Returns true if the second element is zero or the first element has zero quotient by the second one. These are the representative elements of the factor ring by the principal ideal generated by the second element.

Calculates the greatest common divisor of two elements using the Euclidean algorithm.

Calculates the lest common divisor of the two elements.

Performs the extended Euclidean algorithm which returns the greatest common divisor, and two elements that multiplied with the inputs gives the greatest common divisor.

Checks if the given two elements are relative prime.

Implementors