JIGL
v1.6

jigl.signal.utils
Class FFT

java.lang.Object
  |
  +--jigl.signal.utils.FFT

public class FFT
extends Object

Fast Fourier Transform Class for one-dimension signal. Makes sure that the length of your signal is of power of 2 before applying FFT.

To get the correct shape of the Fourier Transform, you should shift the result signal right by half length.


Field Summary
(package private) static int MAX_POW
          Defines maximum length of the signal, which is 2^MAX_POW.
(package private) static int[] pow2
          An array to store the integers of power of 2.
 
Constructor Summary
FFT()
          Default constructor
 
Method Summary
(package private) static void bitDump(int d)
           
(package private) static int BitReverse(int i, int k)
           
static ComplexSignal doFFT(Signal im, boolean forward)
          Perforn the Fourier transform
static ComplexSignal forward(Signal im)
          Perform the Fourier Transform
static ComplexSignal inverse(Signal im)
          Perform the Inverse Fourier Transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_POW

static final int MAX_POW
Defines maximum length of the signal, which is 2^MAX_POW.

See Also:
Constant Field Values

pow2

static final int[] pow2
An array to store the integers of power of 2.

Constructor Detail

FFT

public FFT()
Default constructor

Method Detail

BitReverse

static int BitReverse(int i,
                      int k)

bitDump

static void bitDump(int d)

forward

public static ComplexSignal forward(Signal im)
Perform the Fourier Transform


inverse

public static ComplexSignal inverse(Signal im)
Perform the Inverse Fourier Transform


doFFT

public static ComplexSignal doFFT(Signal im,
                                  boolean forward)
Perforn the Fourier transform

Parameters:
forward - true=Fourier, false=Inverse Fourier

JIGL
v1.6

Submit a bug or feature
Revised in May 2002 by Weiming Liu