Class Complex1D
java.lang.Object
ffx.numerics.fft.Complex1D
This algorithm factors a size n FFT into nX * nY,
computes nY inner FFTs of size nX and nX inner FFTs of size nY,
then combines the results to get the final answer.
This is incomplete.
-
Constructor Summary
ConstructorsConstructorDescriptionComplex1D(int n) Construct a Complex instance for interleaved data of length n.Complex1D(int n, DataLayout1D dataLayout, int imOffset) Construct a Complex instance for data of length n. -
Method Summary
Modifier and TypeMethodDescriptionvoidfft(double[] data, int offset, int stride) Compute the Fast Fourier Transform of data leaving the result in data.voidifft(double[] data, int offset, int stride) Compute the (un-normalized) inverse FFT of data, leaving it in place.static voidTest the Complex FFT.
-
Constructor Details
-
Complex1D
public Complex1D(int n) Construct a Complex instance for interleaved data of length n. Factorization of n is designed to use special methods for small factors, and a general routine for large odd prime factors. Scratch memory is created of length 2*n, which is reused each time a transform is computed.- Parameters:
n- Number of complex numbers (n .GT. 1).
-
Complex1D
Construct a Complex instance for data of length n. The offset to each imaginary part relative to the real part is given by im. Factorization of n is designed to use special methods for small factors. Scratch memory is created of length 2*n, which is reused each time a transform is computed.- Parameters:
n- Number of complex numbers (n .GT. 1).dataLayout- Data layout (interleaved or blocked).imOffset- Offset to the imaginary part of each complex number relative to its real part.
-
-
Method Details
-
fft
public void fft(double[] data, int offset, int stride) Compute the Fast Fourier Transform of data leaving the result in data. The array data must contain the data points in the following locations:Re(d[i]) = data[offset + stride*i] Im(d[i]) = data[offset + stride*i + im]
where im is 1 for interleaved data or a constant set when the class was constructed.
- Parameters:
data- an array of double.offset- the offset to the beginning of the data.stride- the stride between data points.
-
ifft
public void ifft(double[] data, int offset, int stride) Compute the (un-normalized) inverse FFT of data, leaving it in place. The frequency domain data must be in wrap-around order, and be stored in the following locations:Re(D[i]) = data[offset + stride*i] Im(D[i]) = data[offset + stride*i + im]
- Parameters:
data- an array of double.offset- the offset to the beginning of the data.stride- the stride between data points.
-
main
-