pub struct CubicSpline {
pub x: Vec<f64>,
pub a: Vec<f64>,
pub b: Vec<f64>,
pub c: Vec<f64>,
pub d: Vec<f64>,
}Expand description
Natural cubic spline representation.
For each interval [x[i], x[i+1]] the spline is:
S_i(t) = a[i] + b[i]*t + c[i]*t^2 + d[i]*t^3where t = x_query - x[i].
Fields§
§x: Vec<f64>Knot positions (sorted, length n).
a: Vec<f64>Constant coefficients (= y values at knots), length n-1.
b: Vec<f64>Linear coefficients, length n-1.
c: Vec<f64>Quadratic coefficients, length n-1.
d: Vec<f64>Cubic coefficients, length n-1.
Auto 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more