Computes FFT's of real, single precision data where n is an integral power of 2.

Package jnt.FFT Description

This package defines various classes for carrying out Fast Fourier Transforms
(NOTE: See licencing issues).
There are classes to handle: real and complex data; single and double precision;
1 and 2 dimensions; various FFT methods -- although not all combinations are provided.

Although it would be attractive to define a single API, the variety of data types
forbids this. The general API, however, is :

FFTclass fft = new FFTclass(n)

creates an instance of FFTclass appropriate for computing FFT's
of n data points. This allows it to pre-compute any twiddle factors it
may need. Each class defines (at least) these methods to transform,
backtransform (inverse transform without normalization) and inverse.

public void transform(double|float data[]);

Fourier transforms data, in place. It leaves the complex result of
transforming data in a (possibly) class-specific layout.
See the class's documentation for details.

public double|float[] toWraparoundOrder(double|float data[]);

Creates an array containing the result of transform in
wraparound order. If transform already
leaves the result in that order, data is returned as is.

public void backtransform(double|float data[]);

Compute the inverse (unnormalized) transform of data. Each class's
backtransform method understands the storage format of its transform.
The transformation is carried out in place.

public float|double normalization();

Return the normalization constant to be multiplied by the elements of the
backtransform to obtain the normalized inverse.

public void inverse(double|float data[]);

Compute the inverse (normalized) transform of data. Each class's
backtransform method understands the storage format of its transform.
The transformation is carried out in place.

The result of a Fourier transform of either real or complex data is always complex,
although in the real case, there is an extra symmetry. All transform methods in
this package strive to carry out the transform in place: the transformed data
is left in the same array as the initial data. Some algorithms, particularly those
of real data, leave the transformed data in unusual arrangements with the real parts
at one location and the imaginary parts implied, or at another location.

To the extent that one needs a standard order at all, we have arbitrarily
chosen `wrap-around' order as the preferred one. For testing purposes, or
when you dont want to have to understand a peculiar format, you may use the
toWraparoundOrder method to convert the data to the following format.
If D[i] is the transform of d[i], where delta is the time spacing between points in the
orignal data d[i]:

The modifications I have made to port the routines from
C to Java, and the additional classes developed were
developed as part of my official duties as a U.S.
government employee, and are therefore not subject
to copyright.

Furthermore, this software is under development, and is
in no way certified or guaranteed.