pub struct RingSource<const N: usize> { /* private fields */ }Expand description
A fixed-capacity ring buffer residual source for embedded/bare-metal.
Accepts streamed residual norms one at a time and exposes the most recent N observations as a contiguous slice. All storage is stack-allocated.
Implementations§
Trait Implementations§
Source§impl<const N: usize> ResidualSource for RingSource<N>
impl<const N: usize> ResidualSource for RingSource<N>
Source§fn residual_norms(&self) -> &[f32]
fn residual_norms(&self) -> &[f32]
Borrow the current residual norm buffer as an immutable slice. Read more
Source§fn snr_estimate_db(&self) -> f32
fn snr_estimate_db(&self) -> f32
Current SNR estimate in dB. Return
f32::NAN if unknown.Source§fn sample_count(&self) -> usize
fn sample_count(&self) -> usize
Number of valid samples in the current buffer.
Auto Trait Implementations§
impl<const N: usize> Freeze for RingSource<N>
impl<const N: usize> RefUnwindSafe for RingSource<N>
impl<const N: usize> Send for RingSource<N>
impl<const N: usize> Sync for RingSource<N>
impl<const N: usize> Unpin for RingSource<N>
impl<const N: usize> UnsafeUnpin for RingSource<N>
impl<const N: usize> UnwindSafe for RingSource<N>
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