pub struct LinearInterpolator { /* private fields */ }Expand description
A linear interpolater.
This interpolater uses linear interpolation to fill in missing values in a time series.
§Example
use augurs_core::interpolate::*;
let got = LinearInterpolator::default().interpolate(1.0, 2.0, 4).collect::<Vec<_>>();
assert_eq!(got, vec![1.0, 1.25, 1.5, 1.75]);Trait Implementations§
Source§impl Clone for LinearInterpolator
impl Clone for LinearInterpolator
Source§fn clone(&self) -> LinearInterpolator
fn clone(&self) -> LinearInterpolator
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearInterpolator
impl Debug for LinearInterpolator
Source§impl Default for LinearInterpolator
impl Default for LinearInterpolator
Source§fn default() -> LinearInterpolator
fn default() -> LinearInterpolator
Returns the “default value” for a type. Read more
Source§impl Interpolater for LinearInterpolator
impl Interpolater for LinearInterpolator
Source§fn interpolate<T: Interpolatable>(
&self,
low: T,
high: T,
n: usize,
) -> impl Iterator<Item = T>
fn interpolate<T: Interpolatable>( &self, low: T, high: T, n: usize, ) -> impl Iterator<Item = T>
Interpolate between two values. Read more
impl Copy for LinearInterpolator
Auto Trait Implementations§
impl Freeze for LinearInterpolator
impl RefUnwindSafe for LinearInterpolator
impl Send for LinearInterpolator
impl Sync for LinearInterpolator
impl Unpin for LinearInterpolator
impl UnwindSafe for LinearInterpolator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)