All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.math.FFT

java.lang.Object
   |
   +----crw.math.FFT

public class FFT
extends Object
Class to perform FFT. Both 1-dimensional and n-dimensional FFT algorithms are given. Static methods provided are the four1() and fourn() FFT algorithms from the Numerical Recipes in C, and other convenient methods. This class is in active development.

Version:
1.0 or 1.1, 1997/6/13.
Author:
C. R. Wie

Constructor Index

 o FFT()

Method Index

 o four1(float[], int, int)
Replaces data by its discrete Fourier transform, if isign is input as 1; or replaces data by nn times its inverse Fourier transform, if isign is input as -1.
 o fourn(float[], int[], int, int)
Rplaces data by its ndim-dimensional discrete Fourier transform, if isign is input as +1.

Constructors

 o FFT
 public FFT()

Methods

 o four1
 public static void four1(float data[],
                          int nn,
                          int isign)
Replaces data by its discrete Fourier transform, if isign is input as 1; or replaces data by nn times its inverse Fourier transform, if isign is input as -1. data is a complex array of length nn, input as a real array data[1..2*nn]. nn MUST be an integer power of 2 (this is not checked for!). Algorithm: Numerical recipes in C, pp.411-412.

Parameters:
data - input data, array of floats
nn - dimension of the complex array
isign - +1 for FT and -1 for inverse transform.
 o fourn
 public static void fourn(float data[],
                          int nn[],
                          int ndim,
                          int isign)
Rplaces data by its ndim-dimensional discrete Fourier transform, if isign is input as +1. nn[1..ndim] is an integer array containing the lengths of each dimension (number of complex values), which MUST all be powers of 2. data is a real array of length twice the product of these lengths, in which the data are stored as in a multidimensional complex array; real and imaginary parts of each element are in cosecutive locations, and the rightmost index of the array increases most rapidly as one proceeds along data. For a two dimensional array, this is equivalent to storing the array by rows. If isign is input as -1, data is replaced by its inverse transform times the product of the lengths of all dimensions.

Parameters:
data - a real array twice the product of lengths of each dimension.
nn - an integer array containg the array of each dimension, MUST be powers of 2.
ndim - the dimension.
isign - +1 for discrete Foruier transform, -1 for inverse transform times the product of each dimensions.

All Packages  Class Hierarchy  This Package  Previous  Next  Index