public class FourierMath
extends java.lang.Object
Constructor and Description |
---|
FourierMath() |
Modifier and Type | Method and Description |
---|---|
static void |
calculateMagnitudes(double[] ar,
double[] ai,
double[] magnitudes)
Calculate the amplitude of the sine wave associated with each bin of a complex FFT result.
|
static void |
calculateMagnitudes(float[] ar,
float[] ai,
float[] magnitudes)
Calculate the amplitude of the sine wave associated with each bin of a complex FFT result.
|
static void |
fft(int n,
double[] ar,
double[] ai)
Calculate an FFT in place, modifying the input arrays.
|
static void |
ifft(int n,
double[] ar,
double[] ai)
Calculate an inverse FFT in place, modifying the input arrays.
|
static int |
numBits(int powerOf2)
Calculate log2(n)
|
static void |
transform(int sign,
int n,
double[] ar,
double[] ai) |
static void |
transform(int sign,
int n,
float[] ar,
float[] ai) |
public static void calculateMagnitudes(double[] ar, double[] ai, double[] magnitudes)
ar
- ai
- magnitudes
- public static void calculateMagnitudes(float[] ar, float[] ai, float[] magnitudes)
ar
- ai
- magnitudes
- public static void transform(int sign, int n, double[] ar, double[] ai)
public static void transform(int sign, int n, float[] ar, float[] ai)
public static int numBits(int powerOf2)
powerOf2
- must be a power of two, for example 512 or 1024public static void fft(int n, double[] ar, double[] ai)
n
- ar
- ai
- public static void ifft(int n, double[] ar, double[] ai)
n
- ar
- ai
-