InterpType

Trait InterpType 

Source
pub trait InterpType<T> {
    type Interpolation: Interpolation<T> + Send + Sync;

    // Required methods
    fn build(
        &self,
        xa: &[T],
        ya: &[T],
    ) -> Result<Self::Interpolation, InterpolationError>;
    fn name(&self) -> &str;
    fn min_size(&self) -> usize;
}
Expand description

Representation of an Interpolation Type.

Required Associated Types§

Source

type Interpolation: Interpolation<T> + Send + Sync

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

Required Methods§

Source

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

Creates an Interpolator from the data arrays xa and ya.

§Example

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

fn name(&self) -> &str

Returns the name of the Interpolator.

Source

fn min_size(&self) -> usize

Returns the minimum number of points required by the Interpolator.

Implementors§