View source code Display the source code in std/numeric.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

std.numeric.fft.fft - multiple declarations

Function Fft.fft

Compute the Fourier transform of range using the Ο(N log N) Cooley-Tukey Algorithm. range must be a random-access 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

License

Boost License 1.0.

Comments