Class FastFourierTransform

java.lang.Object
 FastFourierTransform

public final class FastFourierTransform
extends java.lang.Object

The class FastFourierTransform contains methods for performing basic numerical computations of discrete Fourier transform (DFT) in 1-D, 2-D and 3-D. The dimension of the input matrix must be the interger power of 2 due to the algorithm of the fast Fourier transform (FFT).

Since:
JDK1.4

Constructor Summary
FastFourierTransform()
           
 
Method Summary
static void fastFT(double[][][] realArray, double[][][] imagArray, boolean direction)
          Computes the discrete Fourier transform in 3-D with the specified arrays and direction using the fast Fourier transform (FFT) algorithm.
static void fastFT(double[][] realArray, double[][] imagArray, boolean direction)
          Computes the discrete Fourier transform in 2-D with the specified arrays and direction using the fast Fourier transform (FFT) algorithm.
static void fastFT(double[] realArray, double[] imagArray, boolean direction)
          Computes the discrete Fourier transform in 1-D with the specified arrays and direction using the fast Fourier transform (FFT) algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastFourierTransform

public FastFourierTransform()
Method Detail

fastFT

public static void fastFT(double[][][] realArray,
                          double[][][] imagArray,
                          boolean direction)
Computes the discrete Fourier transform in 3-D with the specified arrays and direction using the fast Fourier transform (FFT) algorithm. Two double type arrays representing the real part and imaginary part of data in the spatial domain are required for the computation. Notice that the dimension of the arrays must be the same and be an integer power of 2, otherwise, an error will be catched and an exception will be thrown without any computation. If the boolean value of the direction is true, the forward FFT will be performed, or the inverse FFT if false. The computation results are returned in the corresponding real and imaginary input arrays. Therefore, the original data in the two arrays will be lost after the computation.

Parameters:
realArray - a double array representing the real part of complex input data before the computation. It is also the real part of the complex output data after the computation.
imagArray - a double array representing the imaginary part of complex input data before the computation. It is also the imaginary part of the complex output data after the computation.
direction - true if the forward 3-D FFT is executed, false inverse.

fastFT

public static void fastFT(double[][] realArray,
                          double[][] imagArray,
                          boolean direction)
Computes the discrete Fourier transform in 2-D with the specified arrays and direction using the fast Fourier transform (FFT) algorithm. Two double type arrays representing the real part and imaginary part of data in the spatial domain are required for the computation. Notice that the dimension of the arrays must be the same and be an integer power of 2, otherwise, an error will be catched and an exception will be thrown without any computation. If the boolean value of the direction is true, the forward FFT will be performed, or the inverse FFT if false. The computation results are returned in the corresponding real and imaginary input arrays. Therefore, the original data in the two arrays will be lost after the computation.

Parameters:
realArray - a double array representing the real part of complex input data before the computation. It is also the real part of the complex output data after the computation.
imagArray - a double array representing the imaginary part of complex input data before the computation. It is also the imaginary part of the complex output data after the computation.
direction - true if the forward 2-D FFT is executed, false inverse.

fastFT

public static void fastFT(double[] realArray,
                          double[] imagArray,
                          boolean direction)
Computes the discrete Fourier transform in 1-D with the specified arrays and direction using the fast Fourier transform (FFT) algorithm. Two double type arrays representing the real part and imaginary part of data in the spatial domain are required for the computation. Notice that the dimension of the arrays must be the same and be an integer power of 2, otherwise, an error will be catched and an exception will be thrown without any computation. If the boolean value of the direction is true, the forward FFT will be performed, or the inverse FFT if false. The computation results are returned in the corresponding real and imaginary input arrays. Therefore, the original data in the two arrays will be lost after the computation.

Parameters:
realArray - a double array representing the real part of complex input data before the computation. It is also the real part of the complex output data after the computation.
imagArray - a double array representing the imaginary part of complex input data before the computation. It is also the imaginary part of the complex output data after the computation.
direction - true if the forward 1-D FFT is executed, false inverse.