ca.uol.aig.fftpack
Class RealDoubleFFT

java.lang.Object
  extended byca.uol.aig.fftpack.RealDoubleFFT_Mixed
      extended byca.uol.aig.fftpack.RealDoubleFFT

public class RealDoubleFFT
extends ca.uol.aig.fftpack.RealDoubleFFT_Mixed

FFT transform of a real periodic sequence.


Field Summary
 double norm_factor
          norm_factor can be used to normalize this FFT transform.
 
Constructor Summary
RealDoubleFFT(int n)
          Construct a wavenumber table with size n.
 
Method Summary
 void bt(Complex1D x, double[] y)
          Backward real FFT transform.
 void bt(double[] x)
          Backward real FFT transform.
 void ft(double[] x)
          Forward real FFT transform.
 void ft(double[] x, Complex1D y)
          Forward real FFT transform.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

norm_factor

public double norm_factor
norm_factor can be used to normalize this FFT transform. This is because a call of forward transform (ft) followed by a call of backward transform (bt) will multiply the input sequence by norm_factor.

Constructor Detail

RealDoubleFFT

public RealDoubleFFT(int n)
Construct a wavenumber table with size n. The sequences with the same size can share a wavenumber table. The prime factorization of n together with a tabulation of the trigonometric functions are computed and stored.

Parameters:
n - the size of a real data sequence. When n is a multiplication of small numbers (4, 2, 3, 5), this FFT transform is very efficient.
Method Detail

ft

public void ft(double[] x)
Forward real FFT transform. It computes the discrete transform of a real data sequence.

Parameters:
x - an array which contains the sequence to be transformed. After FFT, x contains the transform coeffients used to construct n complex FFT coeffients.
The real part of the first complex FFT coeffients is x[0]; its imaginary part is 0. If n is even set m = n/2, if n is odd set m = n/2, then for
k = 1, ..., m-1
the real part of k-th complex FFT coeffients is x[2*k-1];
the imaginary part of k-th complex FFT coeffients is x[2*k-2].
If n is even, the real of part of (n/2)-th complex FFT coeffients is x[n]; its imaginary part is 0. The remaining complex FFT coeffients can be obtained by the symmetry relation: the (n-k)-th complex FFT coeffient is the conjugate of n-th complex FFT coeffient.

ft

public void ft(double[] x,
               Complex1D y)
Forward real FFT transform. It computes the discrete transform of a real data sequence.

Parameters:
x - an array which contains the sequence to be transformed. After FFT, x contains the transform coeffients used to construct n complex FFT coeffients.
y - the first complex (n+1)/2 (when n is odd) or (n/2+1) (when n is even) FFT coeffients. The remaining complex FFT coeffients can be obtained by the symmetry relation: the (n-k)-th complex FFT coeffient is the conjugate of n-th complex FFT coeffient.

bt

public void bt(double[] x)
Backward real FFT transform. It is the unnormalized inverse transform of ft(double[]).

Parameters:
x - an array which contains the sequence to be transformed. After FFT, x contains the transform coeffients. Also see the comments of ft(double[]) for the relation between x and complex FFT coeffients.

bt

public void bt(Complex1D x,
               double[] y)
Backward real FFT transform. It is the unnormalized inverse transform of ft(Complex1D, double[]).

Parameters:
x - an array which contains the sequence to be transformed. When n is odd, it contains the first (n+1)/2 complex data; when n is even, it contains (n/2+1) complex data.
y - the real FFT coeffients.
Also see the comments of ft(double[]) for the relation between x and complex FFT coeffients.