pub struct KroghInterpolator { /* private fields */ }Expand description
The polynomial of degree n − 1 through n conditions.
Implementations§
Source§impl KroghInterpolator
impl KroghInterpolator
Sourcepub fn new(xi: &[f64], yi: &[f64]) -> Result<KroghInterpolator, ErrorsJSL>
pub fn new(xi: &[f64], yi: &[f64]) -> Result<KroghInterpolator, ErrorsJSL>
Builds the interpolant. xi lists the nodes with each repeated node consecutive; yi[k]
is the value at xi[k] if it is the first copy, else the derivative whose order is the
number of earlier copies. Divided differences with repeated nodes become derivatives
divided by factorials, which is how Vk[0] = yᵢ/s! enters.
Sourcepub fn evaluate(&self, x: f64) -> f64
pub fn evaluate(&self, x: f64) -> f64
The value at x, by nested multiplication of the Newton form.
Sourcepub fn derivatives(&self, x: f64, count: usize) -> Vec<f64>
pub fn derivatives(&self, x: f64, count: usize) -> Vec<f64>
The value and the first count − 1 derivatives at x (SciPy’s derivatives), by
SciPy’s recurrence on the products Π (x − xᵢ).
Sourcepub fn derivative(&self, x: f64, nu: usize) -> f64
pub fn derivative(&self, x: f64, nu: usize) -> f64
The nu-th derivative at x.
Trait Implementations§
Source§impl Clone for KroghInterpolator
impl Clone for KroghInterpolator
Source§impl Debug for KroghInterpolator
impl Debug for KroghInterpolator
Source§impl PartialEq for KroghInterpolator
impl PartialEq for KroghInterpolator
impl StructuralPartialEq for KroghInterpolator
Auto Trait Implementations§
impl Freeze for KroghInterpolator
impl RefUnwindSafe for KroghInterpolator
impl Send for KroghInterpolator
impl Sync for KroghInterpolator
impl Unpin for KroghInterpolator
impl UnsafeUnpin for KroghInterpolator
impl UnwindSafe for KroghInterpolator
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