pub struct TimeSeriesReader<T> { /* private fields */ }Expand description
Unevenly-sampled time series reader with interpolation.
Implementations§
Source§impl<T: Transcendental + Copy> TimeSeriesReader<T>
impl<T: Transcendental + Copy> TimeSeriesReader<T>
Sourcepub fn with_interp(self, mode: InterpMode) -> Self
pub fn with_interp(self, mode: InterpMode) -> Self
Sets the interpolation mode (builder pattern).
Sourcepub fn set_interp(&mut self, mode: InterpMode)
pub fn set_interp(&mut self, mode: InterpMode)
Sets the interpolation mode.
Sourcepub fn interp_mode(&self) -> InterpMode
pub fn interp_mode(&self) -> InterpMode
Returns the current interpolation mode.
Sourcepub fn add_channel(&mut self, channel: TimeSeriesChannel<T>)
pub fn add_channel(&mut self, channel: TimeSeriesChannel<T>)
Adds a time series channel to the reader.
Sourcepub fn num_channels(&self) -> usize
pub fn num_channels(&self) -> usize
Returns the number of channels.
Sourcepub fn channel(&self, index: usize) -> Option<&TimeSeriesChannel<T>>
pub fn channel(&self, index: usize) -> Option<&TimeSeriesChannel<T>>
Returns a reference to a channel by index.
Sourcepub fn channel_mut(&mut self, index: usize) -> Option<&mut TimeSeriesChannel<T>>
pub fn channel_mut(&mut self, index: usize) -> Option<&mut TimeSeriesChannel<T>>
Returns a mutable reference to a channel by index.
Sourcepub fn at_time(&self, channel: usize, t: f64) -> T
pub fn at_time(&self, channel: usize, t: f64) -> T
Reads a sample from a channel at the given time using interpolation.
Sourcepub fn channels(&self) -> &[TimeSeriesChannel<T>]
pub fn channels(&self) -> &[TimeSeriesChannel<T>]
Returns a slice of all channels.
Trait Implementations§
Source§impl<T: Transcendental + Copy> Algorithm<T> for TimeSeriesReader<T>
impl<T: Transcendental + Copy> Algorithm<T> for TimeSeriesReader<T>
Source§fn process(
&mut self,
_input: Option<&[T]>,
output: &mut [T],
) -> ProcessResult<()>
fn process( &mut self, _input: Option<&[T]>, output: &mut [T], ) -> ProcessResult<()>
Process one block of signal. Read more
Source§fn metadata(&self) -> AlgorithmMetadata
fn metadata(&self) -> AlgorithmMetadata
Descriptive metadata (defaults to empty).
Source§fn apply_command(&mut self, _value: T)
fn apply_command(&mut self, _value: T)
Receive a real-time command value from the control path. Read more
Source§impl<T: Transcendental + Copy> Default for TimeSeriesReader<T>
impl<T: Transcendental + Copy> Default for TimeSeriesReader<T>
Auto Trait Implementations§
impl<T> Freeze for TimeSeriesReader<T>
impl<T> RefUnwindSafe for TimeSeriesReader<T>where
T: RefUnwindSafe,
impl<T> Send for TimeSeriesReader<T>where
T: Send,
impl<T> Sync for TimeSeriesReader<T>where
T: Sync,
impl<T> Unpin for TimeSeriesReader<T>where
T: Unpin,
impl<T> UnsafeUnpin for TimeSeriesReader<T>
impl<T> UnwindSafe for TimeSeriesReader<T>where
T: UnwindSafe,
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