pub struct CubicSpline { /* private fields */ }Expand description
A cubic spline through (xs, ys) knots.
Implementations§
Source§impl CubicSpline
impl CubicSpline
Sourcepub fn new(
xs: &[f64],
ys: &[f64],
bc: BoundaryCondition,
) -> Result<Self, RustyQLibError>
pub fn new( xs: &[f64], ys: &[f64], bc: BoundaryCondition, ) -> Result<Self, RustyQLibError>
Build a spline through the knots (xs strictly increasing,
at least two points; Not-a-Knot needs at least four and falls
back to Natural below that).
Sourcepub fn derivative(&self, x: f64) -> f64
pub fn derivative(&self, x: f64) -> f64
First derivative at x (constant beyond the knots).
Sourcepub fn second_derivative(&self, x: f64) -> f64
pub fn second_derivative(&self, x: f64) -> f64
Second derivative at x (zero beyond the knots).
Trait Implementations§
Source§impl Clone for CubicSpline
impl Clone for CubicSpline
Source§fn clone(&self) -> CubicSpline
fn clone(&self) -> CubicSpline
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CubicSpline
impl RefUnwindSafe for CubicSpline
impl Send for CubicSpline
impl Sync for CubicSpline
impl Unpin for CubicSpline
impl UnsafeUnpin for CubicSpline
impl UnwindSafe for CubicSpline
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