One-dimensional real-to-complex fast Fourier transform. More...
#include <FFT.h>
Public Member Functions | |
| RFFT (int size=0) | |
| int | size () const |
| Get size of transform. | |
| void | forward (T *buf, bool complexBuf=false, bool normalize=true) |
| Perform real-to-complex forward transform in-place. | |
| void | inverse (T *buf, bool complexBuf=false) |
| Perform complex-to-real inverse transform in-place. | |
| void | resize (int n) |
| Set size of transform. | |
One-dimensional real-to-complex fast Fourier transform.
The complex sequence format for forward and inverse transforms is [2r0, r1, i1, ... , r(n/2-1), i(n/2-1), 2r(n/2)]
| RFFT | ( | int | size = 0 | ) |
| [in] | size | size of real input sequence; most efficient when a product of small primes |
| void forward | ( | T * | buf, |
| bool | complexBuf = false, |
||
| bool | normalize = true |
||
| ) |
Perform real-to-complex forward transform in-place.
| [in,out] | buf | input is real sequence, output is complex sequence |
| [in] | complexBuf | If true, then input is [ *, x0, x1, x2, ..., x(n), *] and output is [r0, 0, r1, i1, ..., r(n/2), 0]. If false, then input is [x0, x1, x2, ..., x(n) ] and output is [r0, r1, i1, ..., r(n/2)]. |
| [in] | normalize | whether to scale magnitudes by 1/N |
| void inverse | ( | T * | buf, |
| bool | complexBuf = false |
||
| ) |
Perform complex-to-real inverse transform in-place.
| [in,out] | buf | input is complex sequence, output is real sequence |
| [in] | complexBuf | If true, then input is [r0, 0, r1, i1, ..., r(n/2), 0] and output is [ *, x0, x1, x2, ..., x(n), *]. If false, then input is [r0, r1, i1, ..., r(n/2)] and output is [x0, x1, x2, ..., x(n) ]. |