Documentation ¶
Overview ¶
Package fft provides a fast discrete Fourier transformation algorithm.
Implemented is the 1-dimensional DFT of complex input data for with input lengths which are powers of 2.
The algorithm is non-recursive and works in-place overwriting the input array.
Before doing the transform on acutal data, allocate an FFT object with t := fft.New(N) where N is the length of the input array. Then multiple calls to t.Transform(x) can be done with different input vectors having the same length.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FFT ¶
type FFT struct { N int // Fft length, power of 2. E []complex128 // Precomputed roots table, length N. // contains filtered or unexported fields }
func (FFT) Inverse ¶
func (f FFT) Inverse(x []complex128) []complex128
Inverse is the backwards transform.
func (FFT) Transform ¶
func (f FFT) Transform(x []complex128) []complex128
Forward transform. The forward transform overwrites the input array.
Click to show internal directories.
Click to hide internal directories.