Struct symbolic_polynomials::Polynomial [] [src]

pub struct Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
{ pub monomials: Vec<Monomial<I, C, P>>, }

A symbolic polynomial represented as m_1 + m_2 + ... + m_n.

Fields

A vector of the monomials m_i, where m_i is a Monomial.

Methods

impl<I, C, P> Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

True only if the polynomial is constant and does not depend on any symbolic variables.

Evaluates the Polynomial given the provided mapping of identifier to value assignment.

Returns a code equivalent string representation of the Polynomial. The format specifies a function how to render the identifiers;

Returns the result of the polynomial division with rhs as well as the reminder. Note that this division depends on the ordering of the variable variables type I as explained in Wikipedia.

If the the polynomial is divisible by rhs than returns the result of that division, otherwise None.

Trait Implementations

impl<I: Clone, C: Clone, P: Clone> Clone for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<I: Debug, C: Debug, P: Debug> Debug for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

Formats the value using the given formatter.

impl<I: Eq, C: Eq, P: Eq> Eq for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

impl<I, C, P> Display for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

Formats the value using the given formatter. Read more

impl<I, C, P> From<C> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

Performs the conversion.

impl<'a, I, C, P> From<&'a Monomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

Performs the conversion.

impl<I, C, P> From<Monomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

Performs the conversion.

impl<I, C, P> PartialEq<C> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<I, C, P> PartialEq<Monomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<I, C, P> PartialEq for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<I, C, P> PartialOrd<C> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<I, C, P> PartialOrd<Monomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<I, C, P> PartialOrd for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<I, C, P> Ord for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

This method returns an Ordering between self and other. Read more

impl<I, C, P> MulAssign<C> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the *= operator

impl<'a, I, C, P> Mul<C> for &'a Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, I, C, P> MulAssign<&'a Monomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the *= operator

impl<'a, 'b, I, C, P> Mul<&'a Monomial<I, C, P>> for &'b Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, I, C, P> MulAssign<&'a Polynomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the *= operator

impl<'a, 'b, I, C, P> Mul<&'a Polynomial<I, C, P>> for &'b Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, I, C, P> Div<C> for &'a Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the / operator

The method for the / operator

impl<I, C, P> DivAssign<C> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the /= operator

impl<'a, 'b, I, C, P> Div<&'a Monomial<I, C, P>> for &'b Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, I, C, P> DivAssign<&'a Monomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the /= operator

impl<'a, 'b, I, C, P> Div<&'a Polynomial<I, C, P>> for &'b Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, I, C, P> DivAssign<&'a Polynomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the /= operator

impl<'a, I, C, P> Neg for &'a Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<I, C, P> AddAssign<C> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the += operator

impl<'a, I, C, P> Add<C> for &'a Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, I, C, P> AddAssign<&'a Monomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the += operator

impl<'a, 'b, I, C, P> Add<&'a Monomial<I, C, P>> for &'b Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, I, C, P> AddAssign<&'a Polynomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the += operator

impl<'a, 'b, I, C, P> Add<&'a Polynomial<I, C, P>> for &'b Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the + operator

The method for the + operator

impl<I, C, P> SubAssign<C> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the -= operator

impl<'a, I, C, P> Sub<C> for &'a Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, I, C, P> SubAssign<&'a Monomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the -= operator

impl<'a, 'b, I, C, P> Sub<&'a Monomial<I, C, P>> for &'b Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, I, C, P> SubAssign<&'a Polynomial<I, C, P>> for Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The method for the -= operator

impl<'a, 'b, I, C, P> Sub<&'a Polynomial<I, C, P>> for &'b Polynomial<I, C, P> where
    I: Id,
    C: Coefficient,
    P: Power
[src]

The resulting type after applying the - operator

The method for the - operator