Struct rustnomial::Integral [−][src]
pub struct Integral<N, P: FreeSizePolynomial<N> + Evaluable<N>> { /* fields omitted */ }
Expand description
A type which intreprets a polynomial as an integral, and ensures consistent use of the underlying polynomial as an integral.
Implementations
Returns the area of the integral from the first point to the second point.
Example
use rustnomial::{Polynomial, Integrable}; let polynomial = Polynomial::new(vec![2.0, 1.0]); let integral = polynomial.integral(); assert_eq!(2.0, integral.eval(0.0, 1.0)); assert_eq!(6.0, integral.eval(0.0, 2.0)); assert_eq!(4.0, integral.eval(1.0, 2.0));
Trait Implementations
Auto Trait Implementations
impl<N, P> RefUnwindSafe for Integral<N, P> where
N: RefUnwindSafe,
P: RefUnwindSafe,
impl<N, P> UnwindSafe for Integral<N, P> where
N: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more