bijnum
Class BIJfft

java.lang.Object
  |
  +--bijnum.BIJfft

public class BIJfft
extends java.lang.Object

This class implements a one-dimensional real->complex fast fourier transform Copyright (c) 1999-2004, Michael Abramoff. All rights reserved.


Field Summary
protected  double[] C
           
protected  double[] dx
           
protected  int n
          Local variables used in BIJfht algorithms.
protected  int n2
          Local variables used in BIJfht algorithms.
protected  int nu
          Local variables used in BIJfht algorithms.
protected  int nu1
          Local variables used in BIJfht algorithms.
protected  double[] S
           
protected  float[] x
           
 
Constructor Summary
BIJfft(double[] dx)
          Set up a BIJfft a matrix x of length power of 2.
BIJfft(float[] x)
          Set up a BIJfft a matrix x of length power of 2.
 
Method Summary
protected  int bitrev(int j)
           
 float[] compute(float[] x)
          Compute the 1-D Fast fourier transform for x.
 float[][] compute2(float[] x)
           
static double[] extend(double[] x)
           
static double[] extend(float[] x)
           
 double[] mag()
          Compute power spectrum of FFT 1-D.
protected  void makeSinCosTables()
          Calculate the sin and cos tables for the current vector length.
protected  void progress(double percent)
          Can be used to show progress in other programs.
static void testsin(float[] wave)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

n

protected int n
Local variables used in BIJfht algorithms.

nu

protected int nu
Local variables used in BIJfht algorithms.

n2

protected int n2
Local variables used in BIJfht algorithms.

nu1

protected int nu1
Local variables used in BIJfht algorithms.

C

protected double[] C

S

protected double[] S

dx

protected double[] dx

x

protected float[] x
Constructor Detail

BIJfft

public BIJfft(float[] x)
Set up a BIJfft a matrix x of length power of 2.
Parameters:
x - the real array for which you will compute the 1-D FFT.

BIJfft

public BIJfft(double[] dx)
Set up a BIJfft a matrix x of length power of 2.
Parameters:
x - the real array for which you will compute the 1-D FFT.
Method Detail

compute

public float[] compute(float[] x)
Compute the 1-D Fast fourier transform for x. x must have the same length as BIJfft was initialized with to make sure all tables are still valid.
Parameters:
a - vector x (power 2 length)
Returns:
the power spectrum as a float[].

mag

public final double[] mag()
Compute power spectrum of FFT 1-D. Similar implementation.

progress

protected void progress(double percent)
Can be used to show progress in other programs.

bitrev

protected int bitrev(int j)

makeSinCosTables

protected void makeSinCosTables()
Calculate the sin and cos tables for the current vector length. Saves a lot of time in the main loop.

testsin

public static void testsin(float[] wave)

compute2

public final float[][] compute2(float[] x)

extend

public static double[] extend(double[] x)

extend

public static double[] extend(float[] x)