pub trait R2cPlan {
// Required methods
fn n_fft(&self) -> usize;
fn output_len(&self) -> usize;
fn process(
&mut self,
input: &[f64],
output: &mut [Complex<f64>],
) -> SpectrogramResult<()>;
}Expand description
A planned real-to-complex FFT for a fixed transform length.
Plans must:
- own any internal scratch buffers
- be reusable across many calls
- perform no heap allocation during
process
Required Methods§
fn n_fft(&self) -> usize
fn output_len(&self) -> usize
Sourcefn process(
&mut self,
input: &[f64],
output: &mut [Complex<f64>],
) -> SpectrogramResult<()>
fn process( &mut self, input: &[f64], output: &mut [Complex<f64>], ) -> SpectrogramResult<()>
Process real input to complex output.
§Arguments
input- Real time domain inputoutput- Complex frequency domain output
§Returns
Ok(()) if successful, or SpectrogramError if dimensions are invalid.
§Errors
Returns SpectrogramError::dimension_mismatch if input or output lengths do not match expected sizes.