pub struct Spectrum {
pub step: f64,
pub real: Vec<f64>,
pub imag: Vec<f64>,
}Expand description
One single-window transform: a bin step, and a complex amplitude per bin.
The bins run from DC upwards in steps of step, and the last
one is Nyquist. Amplitude normalization is already applied, so
magnitude of a bin is the amplitude of the component that landed there
and not a quantity awaiting a scale factor.
The fields are public because this is a record and not an owner: a caller
with a spectrum of its own builds one to call reconstruct, and a caller
that received one destructures it into whatever it keeps its data in.
Fields§
§step: f64The frequency distance between neighbouring bins, in Hz.
real: Vec<f64>The real part of each bin.
imag: Vec<f64>The imaginary part of each bin.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Spectrum
Auto Trait Implementations§
impl Freeze for Spectrum
impl RefUnwindSafe for Spectrum
impl Send for Spectrum
impl Sync for Spectrum
impl Unpin for Spectrum
impl UnsafeUnpin for Spectrum
impl UnwindSafe for Spectrum
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