Struct NdSpline

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

Source

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 spline
  • coeffs – The NxM array of spline coefficients where N is ndim and M is row of pieces of coefficients
§Notes
  • NdSpline struct should not be created directly by a user in most cases.
Source

pub fn ndim(&self) -> usize

Returns the spline dimensionality

Source

pub fn order(&self) -> usize

Returns the spline order

Source

pub fn pieces(&self) -> usize

Returns the number of pieces of the spline

Source

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

Returns the view to the breaks array

Source

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

Returns the view to the spline coefficients array

Source

pub fn evaluate(&self, xi: ArrayView1<'a, T>) -> Array2<T>

Evaluates the spline on the given data sites

Trait Implementations§

Source§

impl<'a, T: Debug + Real> Debug for NdSpline<'a, T>

Source§

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

Formats the value using the given formatter. Read more

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> 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.