Trait realfft::RealToComplex[][src]

pub trait RealToComplex<T>: Sync + Send {
    fn process(
        &self,
        input: &mut [T],
        output: &mut [Complex<T>]
    ) -> Result<(), Box<dyn Error>>;
fn process_with_scratch(
        &self,
        input: &mut [T],
        output: &mut [Complex<T>],
        scratch: &mut [Complex<T>]
    ) -> Result<(), Box<dyn Error>>;
fn get_scratch_len(&self) -> usize;
fn len(&self) -> usize;
fn make_input_vec(&self) -> Vec<T>;
fn make_output_vec(&self) -> Vec<Complex<T>>;
fn make_scratch_vec(&self) -> Vec<Complex<T>>; }

An FFT that takes a real-valued input vector of length 2*N and transforms it to a complex spectrum of length N+1.

Required methods

fn process(
    &self,
    input: &mut [T],
    output: &mut [Complex<T>]
) -> Result<(), Box<dyn Error>>
[src]

Transform a vector of N real-valued samples, storing the result in the N/2+1 (with N/2 rounded down) element long complex output vector. The input buffer is used as scratch space, so the contents of input should be considered garbage after calling. It also allocates additional scratch space as needed. An error is returned if any of the given slices has the wrong length.

fn process_with_scratch(
    &self,
    input: &mut [T],
    output: &mut [Complex<T>],
    scratch: &mut [Complex<T>]
) -> Result<(), Box<dyn Error>>
[src]

Transform a vector of N real-valued samples, storing the result in the N/2+1 (with N/2 rounded down) element long complex output vector. The input buffer is used as scratch space, so the contents of input should be considered garbage after calling. It also uses the provided scratch vector instead of allocating, which will be faster if it is called more than once. An error is returned if any of the given slices has the wrong length.

fn get_scratch_len(&self) -> usize[src]

Get the length of the scratch space needed for process_with_scratch.

fn len(&self) -> usize[src]

Get the number of points that this FFT can process.

fn make_input_vec(&self) -> Vec<T>[src]

Convenience method to make an input vector of the right type and length.

fn make_output_vec(&self) -> Vec<Complex<T>>[src]

Convenience method to make an output vector of the right type and length.

fn make_scratch_vec(&self) -> Vec<Complex<T>>[src]

Convenience method to make a scratch vector of the right type and length.

Loading content...

Implementors

impl<T: FftNum> RealToComplex<T> for RealToComplexEven<T>[src]

fn process(
    &self,
    input: &mut [T],
    output: &mut [Complex<T>]
) -> Result<(), Box<dyn Error>>
[src]

Transform a vector of N real-valued samples, storing the result in the N/2+1 element long complex output vector. The input buffer is used as scratch space, so the contents of input should be considered garbage after calling. It also allocates additional scratch space as needed. An error is returned if any of the given slices has the wrong length.

fn process_with_scratch(
    &self,
    input: &mut [T],
    output: &mut [Complex<T>],
    scratch: &mut [Complex<T>]
) -> Result<(), Box<dyn Error>>
[src]

Transform a vector of N real-valued samples, storing the result in the N/2+1 element long complex output vector. The input buffer is used as scratch space, so the contents of input should be considered garbage after calling. It also uses the provided scratch vector instead of allocating, which will be faster if it is called more than once. An error is returned if any of the given slices has the wrong length.

impl<T: FftNum> RealToComplex<T> for RealToComplexOdd<T>[src]

fn process(
    &self,
    input: &mut [T],
    output: &mut [Complex<T>]
) -> Result<(), Box<dyn Error>>
[src]

Transform a vector of N real-valued samples, storing the result in the N/2+1 (with N/2 rounded down) element long complex output vector. The input buffer is used as scratch space, so the contents of input should be considered garbage after calling. It also allocates additional scratch space as needed. An error is returned if any of the given slices has the wrong length.

fn process_with_scratch(
    &self,
    input: &mut [T],
    output: &mut [Complex<T>],
    scratch: &mut [Complex<T>]
) -> Result<(), Box<dyn Error>>
[src]

Transform a vector of N real-valued samples, storing the result in the N/2+1 (with N/2 rounded down) element long complex output vector. The input buffer is used as scratch space, so the contents of input should be considered garbage after calling. It also uses the provided scratch vector instead of allocating, which will be faster if it is called more than once. An error is returned if any of the given slices has the wrong length.

Loading content...