[−][src]Struct peroxide::structure::polynomial::Polynomial
Polynomial Structure
Fields
coef: Vector
Methods
impl Polynomial
[src]
pub fn new(coef: Vector) -> Polynomial
[src]
Create Polynomial
pub fn eval<T>(&self, x: T) -> f64 where
T: Into<f64> + Copy,
[src]
T: Into<f64> + Copy,
Evaluate polynomial with value
Examples
extern crate peroxide; use peroxide::*; let a = poly(c!(1,3,2)); assert_eq!(a.eval(1), 6_f64);
pub fn eval_vec(&self, v: Vector) -> Vector
[src]
Trait Implementations
impl Calculus for Polynomial
[src]
impl Printable for Polynomial
[src]
impl PowOps for Polynomial
[src]
type Output = Polynomial
fn pow(&self, n: usize) -> Polynomial
[src]
fn powf(&self, _f: f64) -> Polynomial
[src]
fn sqrt(&self) -> Self::Output
[src]
impl Clone for Polynomial
[src]
fn clone(&self) -> Polynomial
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Display for Polynomial
[src]
Polynomial Print
Examples
extern crate peroxide; use peroxide::*; let a = poly(c!(1,3,2)); a.print(); //x^2 + 3x + 2
impl Debug for Polynomial
[src]
impl Sub<Polynomial> for Polynomial
[src]
type Output = Polynomial
The resulting type after applying the -
operator.
fn sub(self, other: Polynomial) -> Polynomial
[src]
impl<T> Sub<T> for Polynomial where
T: Into<f64> + Copy,
[src]
T: Into<f64> + Copy,
type Output = Polynomial
The resulting type after applying the -
operator.
fn sub(self, other: T) -> Polynomial
[src]
impl Add<Polynomial> for Polynomial
[src]
type Output = Polynomial
The resulting type after applying the +
operator.
fn add(self, other: Polynomial) -> Polynomial
[src]
impl<T> Add<T> for Polynomial where
T: Into<f64> + Copy,
[src]
T: Into<f64> + Copy,
type Output = Polynomial
The resulting type after applying the +
operator.
fn add(self, other: T) -> Polynomial
[src]
impl<T> Mul<T> for Polynomial where
T: Into<f64> + Copy,
[src]
T: Into<f64> + Copy,
type Output = Polynomial
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Polynomial
[src]
impl Mul<Polynomial> for Polynomial
[src]
type Output = Polynomial
The resulting type after applying the *
operator.
fn mul(self, other: Polynomial) -> Polynomial
[src]
impl<T> Div<T> for Polynomial where
T: Into<f64> + Copy,
[src]
T: Into<f64> + Copy,
type Output = Polynomial
The resulting type after applying the /
operator.
fn div(self, other: T) -> Polynomial
[src]
impl Div<Polynomial> for Polynomial
[src]
type Output = (Polynomial, Polynomial)
The resulting type after applying the /
operator.
fn div(self, other: Polynomial) -> Self::Output
[src]
impl Neg for Polynomial
[src]
type Output = Polynomial
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
Auto Trait Implementations
impl Send for Polynomial
impl Sync for Polynomial
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,