//######################################################################################################################### Class RealFFT public class RealFFT Describtion: Provides fields and methods to efficiently perform a FFT with real-valued input. The FFT size is 2^power (with power>=1). Constructor: public RealFFT(int power, double[][] sine) 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". Throws: InvalidParameterException if power<1 if power > 1 and sine lookup-table is not of the type double[size/2 - 1][2] 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. Both input and output are in natural order. Unlike at "ComplexFFT" the bit-reverse operation is always performed internally by the underlying FFT algorithm. 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 "doxFFT" has to be called. Returns: The data array of the type double[]. The element double[0] holds the real part and double[1] the imaginary part. Both input and output are in natural order. Unlike at "ComplexFFT" the bit-reverse operation is always performed internally by the underlying FFT algorithm. 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]. public boolean doFFT() Starts FFT processing of the real-valued data stored in the data array, assuming that the input data is real (imaginary input being ignored). Because of the symmetrie of FFT on real-valued data the underlying algorithm performes about twice as fast as the one implemented at "ComplexFFT". Returns: True if successful, false otherwise. //#########################################################################################################################