pub struct Linear;
Expand description
Linear Interpolation type.
The simplest type of interpolation.
Trait Implementations§
Source§impl<T> InterpType<T> for Linearwhere
T: Num,
impl<T> InterpType<T> for Linearwhere
T: Num,
Source§fn build(
&self,
xa: &[T],
ya: &[T],
) -> Result<LinearInterp<T>, InterpolationError>
fn build( &self, xa: &[T], ya: &[T], ) -> Result<LinearInterp<T>, InterpolationError>
Constructs a Linear Interpolator.
§Example
let xa = [0.0, 1.0, 2.0];
let ya = [0.0, 2.0, 4.0];
let interp = Linear.build(&xa, &ya)?;
Source§type Interpolator = LinearInterp<T>
type Interpolator = LinearInterp<T>
The returned Interpolator, containing the calculated coefficients and providing the
evaluation methods.
Auto Trait Implementations§
impl Freeze for Linear
impl RefUnwindSafe for Linear
impl Send for Linear
impl Sync for Linear
impl Unpin for Linear
impl UnwindSafe for Linear
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