pub struct NdSpline<'a, T: Real> { /* private fields */ }Expand description
N-dimensional (univariate/multivariate) spline PP-form representation
NdSpline represents n-dimensional splines as the set of its attributes and
NxM array of picewise-polinomial coefficients for every dimension
(N - the number of dimensions).
Also evaluate method is implemented for NdSpline for evaluating the data values
for the given data sites.
Implementations§
Source§impl<'a, T> NdSpline<'a, T>where
T: Real,
impl<'a, T> NdSpline<'a, T>where
T: Real,
Sourcepub fn new(breaks: ArrayView1<'a, T>, coeffs: Array2<T>) -> NdSpline<'a, T>
pub fn new(breaks: ArrayView1<'a, T>, coeffs: Array2<T>) -> NdSpline<'a, T>
Creates NdSpline struct from given breaks and coeffs
§Arguments
breaks– The breaks (data sites) which have been used for computing splinecoeffs– The NxM array of spline coefficients where N isndimand M is row of pieces of coefficients
§Notes
NdSplinestruct should not be created directly by a user in most cases.
Sourcepub fn breaks(&self) -> ArrayView1<'_, T>
pub fn breaks(&self) -> ArrayView1<'_, T>
Returns the view to the breaks array
Sourcepub fn coeffs(&self) -> ArrayView2<'_, T>
pub fn coeffs(&self) -> ArrayView2<'_, T>
Returns the view to the spline coefficients array
Sourcepub fn evaluate(&self, xi: ArrayView1<'a, T>) -> Array2<T>
pub fn evaluate(&self, xi: ArrayView1<'a, T>) -> Array2<T>
Evaluates the spline on the given data sites
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for NdSpline<'a, T>
impl<'a, T> RefUnwindSafe for NdSpline<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for NdSpline<'a, T>
impl<'a, T> Sync for NdSpline<'a, T>
impl<'a, T> Unpin for NdSpline<'a, T>
impl<'a, T> UnwindSafe for NdSpline<'a, T>where
T: RefUnwindSafe,
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 moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.