//######################################################################################################################### Class ComplexFFT public class ComplexFFT Describtion: Provides fields and methods to perform a FFT with complex input. The FFT size is 2^power (with power>=1). Constructor: public ComplexFFT(int power, double[][] sine, int[] bitrev) Parameters: power - Specifies the size of the FFT as power of two (size = 2^power). sine - The sine lookup-table object to be applied. For details see class "Sine". A sine-table is not required if power = 1. In this case any input for "sine" will be ignored and "sine" should be set to "null". bitrev - The bit-reverse lookup-table to be applied. If bit-reversal should not be performed by the FFT, "bitrev" must be set to "null". Throws: InvalidParameterException if power<1 if power > 1 and sine lookup-table is not of the type double[size/2 - 1][2] if the bit-reverse lookup-table is not either of the type int[size] or null Methods: public int getPower() Returns: Returns the FFT power (size = 2^power). public int getSize() Returns: Returns the FFT size (size = 2^power). public double[][] getDataArray() Returns the data array on which the FFT is being performed. Calling this method does not calculate the FFT. For this "doFFT" has to be called. Returns: The data array of the type double[][] on which the FFT is performed. The sub-array double[][0] holds the real part and double[][1] the imaginary part. The underlying FFT algorithm performs a "decimation in time". Hence, input to the data array is expected in bit-reverse order, unless a valid bitrev object of the type int[size] was handed to the constructor. In this case bit-reversal will be done internally and both input and output are in natural order. public double[] getDataPoint(int index) Returns a single point of the data array on which the FFT is being performed, specified by "index". Calling this method does not calculate the FFT. For this "doFFT" has to be called. Returns: The data array of the type double[]. The element double[0] hold the real part and double[1] the imaginary part. The underlying FFT algorithm performs a "decimation in time". Hence, input to the data array is expected in bit-reverse order, unless a valid bitrev object of the type int[size] was handed to the constructor. In this case bit-reversal will be done internally and both input and output are indexed in natural order. Throws: InvalidParameterException if the index<0 or index>size-1 public boolean setDataPoint(int index, double[] data) Sets a single point of the data array on which the FFT is being performed, specified by "index". "data" must be an array of the size 2 (double[2]) where the element double[0] holds the real part and double[1] the imaginary part. Returns: True if performed successfully, false otherwise. Throws: InvalidParameterException if the index<0 or index>size-1 or "data" is not of the type double[2]. protected final void setParent(Object parent) Sets a reference to a parent object. This method is for internal use only and needed in conjuction with the class "RealFFT" at which "ComplexFFT" is being instantiated. public boolean doFFT() Starts FFT processing on the data stored in the data array, assuming that the input data is complex. If a valid bitrev object of the type int[size] was handed to the constructor, a bit-reversal operation will be performed prior to the FFT. Returns: True if successful, false otherwise. //#########################################################################################################################