[][src]Struct abstalg::Polynomials

pub struct Polynomials<R> where
    R: UnitaryRing
{ /* fields omitted */ }

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.

Implementations

impl<R: UnitaryRing> Polynomials<R>[src]

pub fn new(base: R) -> Self[src]

Creates a new ring of polynomials over the given ring. The ring cannot be trivial, that is one must be different from zero.

pub fn base(&self) -> &R[src]

Returns the base ring from which this ring was created.

pub fn degree(&self, elem: &Vec<R::Elem>) -> Option<usize>[src]

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

pub fn leading_coef(&self, elem: &Vec<R::Elem>) -> Option<R::Elem>[src]

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

Trait Implementations

impl<R> Domain for Polynomials<R> where
    R: UnitaryRing
[src]

type Elem = Vec<R::Elem>

The type of the elements of this domain.

impl<F> EuclideanDomain for Polynomials<F> where
    F: Field
[src]

impl<R> IntegralDomain for Polynomials<R> where
    R: IntegralDomain
[src]

impl<R> UnitaryRing for Polynomials<R> where
    R: UnitaryRing
[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for Polynomials<R> where
    R: RefUnwindSafe

impl<R> Send for Polynomials<R> where
    R: Send

impl<R> Sync for Polynomials<R> where
    R: Sync

impl<R> Unpin for Polynomials<R> where
    R: Unpin

impl<R> UnwindSafe for Polynomials<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.