Polynomial

Trait Polynomial 

Source
pub trait Polynomial: IntoIterator + Sized {
    // Provided methods
    fn integral(self) -> Integral<Self::IntoIter>  { ... }
    fn content(self) -> Self::Item
       where Self::Item: Integer { ... }
    fn primitive_part(self) -> Divide<Self::IntoIter, Self::Item> 
       where Self::IntoIter: Clone,
             Self::Item: Integer { ... }
    fn div<U>(self, divisor: U) -> Divide<Self::IntoIter, U>  { ... }
}

Provided Methods§

Source

fn integral(self) -> Integral<Self::IntoIter>

use quickmaths::poly::Polynomial;

let poly = [0., 4.];
assert!(poly.integral().eq([0., 0., 2.]));
Source

fn content(self) -> Self::Item
where Self::Item: Integer,

use quickmaths::poly::Polynomial;

let poly = [-20, 30, 0, -12];
assert_eq!(poly.content(), 2);
Source

fn primitive_part(self) -> Divide<Self::IntoIter, Self::Item>
where Self::IntoIter: Clone, Self::Item: Integer,

use quickmaths::poly::Polynomial;

let poly = [-20, 30, 0, -12];
assert!(poly.primitive_part().eq([-10, 15, 0, -6]));
Source

fn div<U>(self, divisor: U) -> Divide<Self::IntoIter, U>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> Polynomial for T
where T: IntoIterator,