pfft_rfft_f

Calculates discrete fourier transform of the real valued sequence in data. The method operates in place. When the method completes, data contains the result. First n / 2 + 1 elements contain the real part of the result and the rest contains the imaginary part. Imaginary parts at position 0 and n / 2 are known to be equal to 0 and are not stored, so the content of data looks like this:

r(0), r(1), ... r(n / 2), i(1), i(2), ... i(n / 2 - 1)

More...
extern (C)
void
pfft_rfft_f

Detailed Description

The elements of the result at position greater than n / 2 can be trivially calculated from the relation DFT(f)i = DFT(f)[n - i]* that holds because the input sequence is real.

The length of the array must be equal to n and the array must be properly aligned. To obtain a properly aligned array you can use pfft_allocate_f. If you want to take care of memory allocation in some other way, you should make sure that the address data is a multiple of the number returned by pfft_alignment_f.

Meta