pub struct NdGridSpline<'a, T, D>{ /* private fields */ }
Expand description
N-d grid spline PP-form representation
NdGridSpline
represents n-dimensional splines for n-dimensional grid data. In n-d grid case
the spline is represented as tensor-product of univariate spline coefficients along every
diemension.
Also evaluate
method is implemented for NdGridSpline
for evaluating the values
for given data sites.
Implementations§
Source§impl<'a, T, D> NdGridSpline<'a, T, D>
impl<'a, T, D> NdGridSpline<'a, T, D>
Sourcepub fn new(breaks: Vec<ArrayView1<'a, T>>, coeffs: Array<T, D>) -> Self
pub fn new(breaks: Vec<ArrayView1<'a, T>>, coeffs: Array<T, D>) -> Self
Creates NdGridSpline
struct from given breaks
and coeffs
§Arguments
breaks
– The vector of the breaks (data sites) which have been used for computing splinecoeffs
– The n-d array of tensor-product spline coefficients
§Notes
NdGridSpline
struct should not be created directly by a user in most cases.
Sourcepub fn pieces(&self) -> &Vec<usize>
pub fn pieces(&self) -> &Vec<usize>
Returns the vector of the number of pieces of the spline for each dimension
Sourcepub fn breaks(&self) -> &Vec<ArrayView1<'a, T>> ⓘ
pub fn breaks(&self) -> &Vec<ArrayView1<'a, T>> ⓘ
Returns the vector of views to the breaks for each dimension
Sourcepub fn evaluate(&self, xi: &'a [ArrayView1<'a, T>]) -> Array<T, D>
pub fn evaluate(&self, xi: &'a [ArrayView1<'a, T>]) -> Array<T, D>
Evaluates the spline on the given data sites
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, D> Freeze for NdGridSpline<'a, T, D>where
D: Freeze,
impl<'a, T, D> RefUnwindSafe for NdGridSpline<'a, T, D>where
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, D> Send for NdGridSpline<'a, T, D>
impl<'a, T, D> Sync for NdGridSpline<'a, T, D>
impl<'a, T, D> Unpin for NdGridSpline<'a, T, D>where
D: Unpin,
impl<'a, T, D> UnwindSafe for NdGridSpline<'a, T, D>where
D: UnwindSafe,
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.