Struct NdGridSpline

Source
pub struct NdGridSpline<'a, T, D>
where T: Real, D: Dimension,
{ /* 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>
where T: Real, D: Dimension,

Source

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 spline
  • coeffs – The n-d array of tensor-product spline coefficients
§Notes
  • NdGridSpline struct should not be created directly by a user in most cases.
Source

pub fn ndim(&self) -> usize

Returns the n-d grid spline dimensionality

Source

pub fn order(&self) -> &Vec<usize>

Returns the vector of the spline order for each dimension

Source

pub fn pieces(&self) -> &Vec<usize>

Returns the vector of the number of pieces of the spline for each dimension

Source

pub fn breaks(&self) -> &Vec<ArrayView1<'a, T>>

Returns the vector of views to the breaks for each dimension

Source

pub fn coeffs(&self) -> ArrayView<'_, T, D>

Returns the view to the spline coefficients array

Source

pub fn evaluate(&self, xi: &'a [ArrayView1<'a, T>]) -> Array<T, D>

Evaluates the spline on the given data sites

Trait Implementations§

Source§

impl<'a, T, D> Debug for NdGridSpline<'a, T, D>
where T: Real + Debug, D: Dimension + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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>

§

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>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.