pub struct ChebyshevPolynomial {
pub degree: usize,
}Expand description
Chebyshev polynomial of the first kind
Fields§
§degree: usizePolynomial degree
Implementations§
Source§impl ChebyshevPolynomial
impl ChebyshevPolynomial
Sourcepub fn eval(&self, x: f64) -> f64
pub fn eval(&self, x: f64) -> f64
Evaluate T_n(x) using recurrence T_0(x) = 1, T_1(x) = x, T_{n+1}(x) = 2x·T_n(x) - T_{n-1}(x)
Sourcepub fn eval_all(x: f64, max_degree: usize) -> Vec<f64>
pub fn eval_all(x: f64, max_degree: usize) -> Vec<f64>
Evaluate all Chebyshev polynomials T_0(x) through T_n(x)
Sourcepub fn derivative(&self, x: f64) -> f64
pub fn derivative(&self, x: f64) -> f64
Derivative: T’n(x) = n * U{n-1}(x) where U is Chebyshev of second kind
Trait Implementations§
Source§impl Clone for ChebyshevPolynomial
impl Clone for ChebyshevPolynomial
Source§fn clone(&self) -> ChebyshevPolynomial
fn clone(&self) -> ChebyshevPolynomial
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ChebyshevPolynomial
impl RefUnwindSafe for ChebyshevPolynomial
impl Send for ChebyshevPolynomial
impl Sync for ChebyshevPolynomial
impl Unpin for ChebyshevPolynomial
impl UnwindSafe for ChebyshevPolynomial
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more