Struct integral_exponential_polynomial::Polynomial [−] [src]

pub struct Polynomial { /* fields omitted */ }

Methods

impl Polynomial[src]

fn one_term(coeff: BigInt, base: BigUint) -> Polynomial

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 ```

fn apply(&self, value: usize) -> BigInt

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

Arguments

• value - The value to be applied to the polynomial

Example

use num::{BigInt, BigUint, pow};
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 PartialEq for Polynomial[src]

fn eq(&self, __arg_0: &Polynomial) -> bool

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

fn ne(&self, __arg_0: &Polynomial) -> bool

This method tests for !=.

impl Clone for Polynomial[src]

fn clone(&self) -> Polynomial

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Debug for Polynomial[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

type Output = Polynomial

The resulting type after applying the + operator

fn add(self, other: Polynomial) -> Polynomial

The method for the + operator

impl Sub for Polynomial[src]

type Output = Polynomial

The resulting type after applying the - operator

fn sub(self, other: Polynomial) -> Polynomial

The method for the - operator

The method for the += operator

impl SubAssign for Polynomial[src]

fn sub_assign(&mut self, other: Polynomial)

The method for the -= operator

impl Display for Polynomial[src]

fn fmt(&self, fmt: &mut Formatter) -> Result

Formats the value using the given formatter.