Struct peroxide::structure::polynomial::Polynomial
source · pub struct Polynomial {
pub coef: Vector,
}
Expand description
Polynomial Structure
Fields§
§coef: Vector
Implementations§
Trait Implementations§
source§impl Add<Polynomial> for Polynomial
impl Add<Polynomial> for Polynomial
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
+
operator.source§fn add(self, other: Polynomial) -> Polynomial
fn add(self, other: Polynomial) -> Polynomial
Performs the
+
operation. Read moresource§impl<T> Add<T> for Polynomialwhere
T: Into<f64> + Copy,
impl<T> Add<T> for Polynomialwhere
T: Into<f64> + Copy,
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
+
operator.source§fn add(self, other: T) -> Polynomial
fn add(self, other: T) -> Polynomial
Performs the
+
operation. Read moresource§impl Clone for Polynomial
impl Clone for Polynomial
source§fn clone(&self) -> Polynomial
fn clone(&self) -> Polynomial
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Polynomial
impl Debug for Polynomial
source§impl Display for Polynomial
impl Display for Polynomial
Polynomial Print
Examples
extern crate peroxide;
use peroxide::*;
let a = poly(c!(1,3,2));
a.print(); //x^2 + 3x + 2
source§impl<T> Div<T> for Polynomialwhere
T: Into<f64> + Copy,
impl<T> Div<T> for Polynomialwhere
T: Into<f64> + Copy,
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
/
operator.source§fn div(self, other: T) -> Polynomial
fn div(self, other: T) -> Polynomial
Performs the
/
operation. Read moresource§impl ExtraOps for Polynomial
impl ExtraOps for Polynomial
fn pow(&self, n: usize) -> Polynomial
source§impl Mul<Polynomial> for Polynomial
impl Mul<Polynomial> for Polynomial
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
*
operator.source§fn mul(self, other: Polynomial) -> Polynomial
fn mul(self, other: Polynomial) -> Polynomial
Performs the
*
operation. Read moresource§impl<T> Mul<T> for Polynomialwhere
T: Into<f64> + Copy,
impl<T> Mul<T> for Polynomialwhere
T: Into<f64> + Copy,
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
*
operator.source§fn mul(self, other: T) -> Polynomial
fn mul(self, other: T) -> Polynomial
Performs the
*
operation. Read moresource§impl Neg for Polynomial
impl Neg for Polynomial
source§impl Sub<Polynomial> for Polynomial
impl Sub<Polynomial> for Polynomial
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
-
operator.source§fn sub(self, other: Polynomial) -> Polynomial
fn sub(self, other: Polynomial) -> Polynomial
Performs the
-
operation. Read moresource§impl<T> Sub<T> for Polynomialwhere
T: Into<f64> + Copy,
impl<T> Sub<T> for Polynomialwhere
T: Into<f64> + Copy,
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
-
operator.source§fn sub(self, other: T) -> Polynomial
fn sub(self, other: T) -> Polynomial
Performs the
-
operation. Read more