std.numeric.fft.fft
- multiple declarations
- Function Fft.fft
- Function Fft.fft
Function Fft.fft
Compute the Fourier transform of range
using the Ο(N log N
)
Cooley-Tukey Algorithm.
must be a random-access range
range
with
slicing and a length equal to size
as provided at the construction of
this object
. The contents of range
can be either numeric types,
which will be interpreted as pure real values, or complex types with
properties or members .re
and .im
that can be read.
Prototype
Complex!F[] fft(F, R)( R range ) const if (isFloatingPoint!F && isRandomAccessRange!R);
Note
Pure real FFTs are automatically detected and the relevant optimizations are performed.
Returns
An array of complex numbers representing the transformed data in the frequency domain.
Conventions
The exponent is negative and the factor is one, i.e., output[j] := sum[ exp(-2 PI i j k / N) input[k] ].
Function Fft.fft
Same as the overload, but allows for the results to be stored in a user-
provided buffer. The buffer must be of the same length as range
, must be
a random-access range
, must have slicing, and must contain elements that are
complex-like. This means that they must have a .re and a .im member or
property that can be both read and written and are floating point numbers.
Prototype
void fft(Ret, R)( R range, Ret buf ) const if (isRandomAccessRange!Ret && isComplexLike!(ElementType!Ret) && hasSlicing!Ret);
Authors
Andrei Alexandrescu, Don Clugston, Robert Jacques