CFFT1D_R2C Class Reference
Basic data strctures and functions

a class to real-to-complex 1D FFTs More...

`#include <mia/core/fft1d_r2c.hh>`

## Data Structures

struct | Complex

## Public Types

typedef float | Real
| A typedef that makes switching between single precicion and double precicion easier.

## Public Member Functions

std::vector< Real > | backward (const std::vector< Complex > &data) const
void | backward (std::vector< Complex >::const_iterator in_begin, std::vector< Complex >::const_iterator in_end, std::vector< Real >::iterator out_begin) const
| CFFT1D_R2C (size_t n)
std::vector< Complex > | forward (const std::vector< Real > &data) const
void | forward (std::vector< Real >::const_iterator in_begin, std::vector< Real >::const_iterator in_end, std::vector< Complex >::iterator out_begin) const
size_t | out_size () const
| ~CFFT1D_R2C ()

## Detailed Description

a class to real-to-complex 1D FFTs

Class to run a 1D real-to-complex FFT and its inverse. This class makes use of fftw. The result of a forward transform followed directly by a backward transform is the input scaled by the size of the input.

Definition at line 41 of file fft1d_r2c.hh.

## Member Typedef Documentation

## Real

typedef float CFFT1D_R2C::Real

A typedef that makes switching between single precicion and double precicion easier.

Definition at line 61 of file fft1d_r2c.hh.

## Constructor & Destructor Documentation

## CFFT1D_R2C()

CFFT1D_R2C::CFFT1D_R2C | ( | size_t | n | ) |

Construtor to create the needed fftw structures for the FFT of a real input vector of size n

## ~CFFT1D_R2C()

CFFT1D_R2C::~CFFT1D_R2C | ( |  | ) |

## Member Function Documentation

## backward() [1/2]

std::vector< Real > CFFT1D_R2C::backward | ( | const std::vector< Complex > & | data | ) | const

Execute backward transformation. input data must be of size \(\frac{n}{2} + 1\) with n as given at construction time

Returns
  the backward transformed series

## backward() [2/2]

void CFFT1D_R2C::backward | ( | std::vector< Complex >::const_iterator | in_begin,
|  | std::vector< Complex >::const_iterator | in_end,
|  | std::vector< Real >::iterator | out_begin ) const

Execute forward transformation. distance(in_begin, in_end) must be equal to \(\frac{n}{2} + 1\) with n as given at construction time

Parameters

  in_begin |
  in_end |
  out_begin | output iterator pointing at the output range that must be at least of size n as given at construction time

See also
  out_size

## forward() [1/2]

std::vector< Complex > CFFT1D_R2C::forward | ( | const std::vector< Real > & | data | ) | const

Execute forward transformation. input data must be of size n that was given at construction time

Returns
  the transformed in halfcomplex format (i.e. only the non-negative coefficints, since the fft is sysetric

## forward() [2/2]

void CFFT1D_R2C::forward | ( | std::vector< Real >::const_iterator | in_begin,
|  | std::vector< Real >::const_iterator | in_end,
|  | std::vector< Complex >::iterator | out_begin ) const

Execute forward transformation. distance(in_begin, in_end) must be equal to n as given at construction time

Parameters

  in_begin |
  in_end |
  out_begin | output iterator pointing at the output range that must be at least of size \(\frac{n}{2} + 1\) with n as given at construction time

See also
  out_size

## out_size()

size_t CFFT1D_R2C::out_size | ( |  | ) | const

Returns
  the size of the forward transform result (i.e. \(\frac{n}{2} + 1\)) complex numbers.

The documentation for this class was generated from the following file:

- fft1d_r2c.hh