|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openuat.features.FFT
public class FFT
Compute the FFT and inverse FFT of a length N complex sequence. Bare bones implementation that runs in O(N log N) time. Our goal is to optimize the clarity of the code, rather than performance. Limitations ----------- - assumes N is a power of 2 - not the most memory efficient algorithm (because it uses an object type for representing complex numbers and because it re-allocates memory for the subarray, instead of doing in-place or reusing a single temporary array)
| Constructor Summary | |
|---|---|
FFT()
|
|
| Method Summary | |
|---|---|
static Complex[] |
cconvolve(Complex[] x,
Complex[] y)
compute the circular convolution of x and y. |
static Complex[] |
convolve(Complex[] x,
Complex[] y)
compute the linear convolution of x and y. |
static Complex[] |
fft(Complex[] x)
compute the FFT of x[], assuming its length is a power of 2. |
static double[] |
fftPowerSpectrum(double[] x,
int offset,
int len)
This is a helper function which computes the FFT power spectrum coefficients of a signal in time domain. |
static Complex[] |
ifft(Complex[] x)
compute the inverse FFT of x[], assuming its length is a power of 2. |
static void |
main(java.lang.String[] args)
|
static double[] |
powerSpectrum(Complex[] x)
Computes the power spectrum of a complex signal, see e.g. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FFT()
| Method Detail |
|---|
public static Complex[] fft(Complex[] x)
public static Complex[] ifft(Complex[] x)
public static Complex[] cconvolve(Complex[] x,
Complex[] y)
public static Complex[] convolve(Complex[] x,
Complex[] y)
public static double[] powerSpectrum(Complex[] x)
public static double[] fftPowerSpectrum(double[] x,
int offset,
int len)
x - The input time series.offset - Values will be taken from the time series starting at this offset.len - This number of values will be used from the time series.public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||