realFft method

Float64x2List realFft(
  1. List<double> reals
)

Real-valued FFT.

Performs an FFT on real-valued inputs. Returns the result as a newly allocated Float64x2List, and doesn't modify the input array.

The complex numbers in the Float64x2List contain both the amplitude and phase information for each frequency. If you only care about the amplitudes, use ComplexArray.magnitudes.

The result of a real valued FFT has a lot of redundant information in it. See ComplexArray.discardConjugates for more info.

Implementation

Float64x2List realFft(List<double> reals) {
  final o = ComplexArray.fromRealArray(reals);
  inPlaceFft(o);
  return o;
}