InterpType

Trait InterpType 

Source
pub trait InterpType<T>
where T: Num,
{ type Interpolator: Interpolation<T>; const MIN_SIZE: usize; const NAME: &str; // Required method fn build( &self, xa: &[T], ya: &[T], ) -> Result<Self::Interpolator, InterpolationError>; // Provided methods fn name(&self) -> String { ... } fn min_size(&self) -> usize { ... } }
Expand description

Representation of an Interpolation Type.

Required Associated Constants§

Source

const MIN_SIZE: usize

The minimum number of points required by the Interpolator.

Source

const NAME: &str

The name of the Interpolator.

Required Associated Types§

Source

type Interpolator: Interpolation<T>

The returned Interpolator, containing the calculated coefficients and providing the evaluation methods.

Required Methods§

Source

fn build( &self, xa: &[T], ya: &[T], ) -> Result<Self::Interpolator, InterpolationError>

Creates an Interpolator from the data arrays xa and ya.

§Example
use rsl_interpolation::Cubic;

let xa = [0.0, 1.0, 2.0];
let ya = [0.0, 2.0, 4.0];
let interp = Cubic.build(&xa, &ya)?;

Provided Methods§

Source

fn name(&self) -> String

Returns the name of the Interpolator.

Source

fn min_size(&self) -> usize

Returns the minimum number of points required by the Interpolator.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> InterpType<T> for Akima
where T: Num,

Source§

const MIN_SIZE: usize = 5usize

Source§

const NAME: &str = "Akima"

Source§

type Interpolator = AkimaInterp<T>

Source§

impl<T> InterpType<T> for AkimaPeriodic
where T: Num,

Source§

const MIN_SIZE: usize = 5usize

Source§

const NAME: &str = "Akima Periodic"

Source§

type Interpolator = AkimaPeriodicInterp<T>

Source§

impl<T> InterpType<T> for Cubic
where T: Num + Lapack,

Source§

const MIN_SIZE: usize = 3usize

Source§

const NAME: &str = "Cubic"

Source§

type Interpolator = CubicInterp<T>

Source§

impl<T> InterpType<T> for CubicPeriodic
where T: Num + Lapack,

Source§

const MIN_SIZE: usize = 3usize

Source§

const NAME: &str = "Cubic Periodic"

Source§

type Interpolator = CubicPeriodicInterp<T>

Source§

impl<T> InterpType<T> for Linear
where T: Num,

Source§

const MIN_SIZE: usize = 2usize

Source§

const NAME: &str = "Linear"

Source§

type Interpolator = LinearInterp<T>

Source§

impl<T> InterpType<T> for Steffen
where T: Num,

Source§

const MIN_SIZE: usize = 3usize

Source§

const NAME: &str = "Steffen"

Source§

type Interpolator = SteffenInterp<T>