[][src]Struct integral_exponential_polynomial::Polynomial

pub struct Polynomial { /* fields omitted */ }

Methods

impl Polynomial[src]

pub fn one_term(coeff: BigInt, base: BigUint) -> Polynomial[src]

Returns a new polynomial with at most one term. When either coefficient or base is zero, an empty polynomial is returned.

Arguments

  • coeff - A BigInt represents the coefficient of the term
  • base - A BigUint represents the base of the component function

pub fn apply(&self, value: usize) -> BigInt[src]

Returns the result for applying the given value to the polynomial.

Arguments

  • value - The value to be applied to the polynomial

Example

let p = Polynomial::one_term(BigInt::from(10), BigUint::from(20u8));
assert_eq!(p.apply(30), (BigInt::from(10) *
                         BigInt::from(pow(BigUint::from(20u8), 30))));

Trait Implementations

impl Clone for Polynomial[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Polynomial> for Polynomial[src]

impl Eq for Polynomial[src]

impl Debug for Polynomial[src]

impl Display for Polynomial[src]

impl Add<Polynomial> for Polynomial[src]

type Output = Polynomial

The resulting type after applying the + operator.

impl Sub<Polynomial> for Polynomial[src]

type Output = Polynomial

The resulting type after applying the - operator.

impl AddAssign<Polynomial> for Polynomial[src]

impl SubAssign<Polynomial> for Polynomial[src]

Auto Trait Implementations

Blanket Implementations

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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