Trait realfft::ComplexToReal[][src]

pub trait ComplexToReal<T>: Sync + Send {
    fn process(
        &self,
        input: &mut [Complex<T>],
        output: &mut [T]
    ) -> Result<(), Box<dyn Error>>;
fn process_with_scratch(
        &self,
        input: &mut [Complex<T>],
        output: &mut [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<Complex<T>>;
fn make_output_vec(&self) -> Vec<T>;
fn make_scratch_vec(&self) -> Vec<Complex<T>>; }

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

Required methods

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

Transform a complex spectrum of N/2+1 (with N/2 rounded down) values and store the real result in the N long output. 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 [Complex<T>],
    output: &mut [T],
    scratch: &mut [Complex<T>]
) -> Result<(), Box<dyn Error>>
[src]

Transform a complex spectrum of N/2+1 (with N/2 rounded down) values and store the real result in the 2*N long output. 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<Complex<T>>[src]

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

fn make_output_vec(&self) -> Vec<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> ComplexToReal<T> for ComplexToRealEven<T>[src]

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

Transform a complex spectrum of N/2+1 values and store the real result in the N long output. 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 [Complex<T>],
    output: &mut [T],
    scratch: &mut [Complex<T>]
) -> Result<(), Box<dyn Error>>
[src]

Transform a complex spectrum of N/2+1 values and store the real result in the N long output. 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> ComplexToReal<T> for ComplexToRealOdd<T>[src]

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

Transform a complex spectrum of N/2+1 (with N/2 rounded down) values and store the real result in the N long output. 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 [Complex<T>],
    output: &mut [T],
    scratch: &mut [Complex<T>]
) -> Result<(), Box<dyn Error>>
[src]

Transform a complex spectrum of N/2+1 (with N/2 rounded down) values and store the real result in the N long output. 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...