[][src]Trait realfft::ComplexToReal

pub trait ComplexToReal<T> {
    pub fn process(
        &self,
        input: &mut [Complex<T>],
        output: &mut [T]
    ) -> Result<(), Box<dyn Error>>;
pub fn process_with_scratch(
        &self,
        input: &mut [Complex<T>],
        output: &mut [T],
        scratch: &mut [Complex<T>]
    ) -> Result<(), Box<dyn Error>>;
pub fn get_scratch_len(&self) -> usize;
pub fn len(&self) -> usize;
pub fn make_input_vec(&self) -> Vec<Complex<T>>;
pub fn make_output_vec(&self) -> Vec<T>;
pub 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

pub 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.

pub 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.

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

Get the length of the scratch space needed for process_with_scratch.

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

Get the number of points that this FFT can process.

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

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

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

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

pub 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]

pub 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.

pub 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]

pub 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.

pub 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...