pub struct PolynomialAlgebra<A> where
    A: AbelianGroup
{ /* private fields */ }
Expand description

The ring of polynomials over a base ring or field where each element is represented as a vector whose last element, the leading coefficient (if any) must be non-zero. This means that the empty vector is the zero element, and every polynomial has a unique representation. Polynomials can be defined over any abelian group, though only the group operations will be available.

Implementations

Creates a new polynomial algebra from the given base.

Returns the base ring from which this ring was created.

Returns the degree of the given polynomial. The zero polynomial has no degree.

Returns the leading coefficient of the given polynomial. The zero polynomial has no leading coefficient.

Trait Implementations

The additive identity element of the ring.

Checks if the given element is the additive identity of the ring.

The additive inverse of the given element.

The additive sum of the given elements

Returns an integer multiple of the given element.

The element is changed to its additive inverse.

The second element is added to the first one.

Doubles the given element in place.

The difference of the given elements.

The second element is subtracted from the first one.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The type of the elements of this domain.

Checks if the given object is a member of the domain.

Checks if the given objects represent the same element of the set.

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) Read more

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

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

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. Read more

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

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. Read more

Checks if the given two elements are relative prime.

Checks if the second element divides the first one and returns the unique quotient if it exists. This method panics if the second element is zero (because there would be no unique solution). Read more

We assume, that among all associates of the given elem there is a well defined unique one (non-negative for integers, zero or monic for polynomials). This method returns that representative element. Read more

Returns the unique invertible element which is the quotient of the associate representative and the given element. This method panics if the element is zero. Read more

Checks if the first element is a multiple of (or divisible by) the second one. Read more

Returns true if the two elements are associates (divide each other)

The multiplicative identity element of the ring.

Checks if the given element is the multiplicative identity.

Calculates the multiplicative inverse of the given element if it exists.

Returns true if the given element has a multiplicative inverse.

The multiplicative product of the given elements.

The first element is multiplied with the second one in place.

Squares the given element in place.

Returns the integer multiple of the one element in the ring.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.