@PublicationReference(author="Wikipedia", title="Fast Fourier transform", type=WebPage, year=2009, url="http://en.wikipedia.org/wiki/Fast_Fourier_transform") public class FourierTransform extends AbstractCloneableSerializable implements Evaluator<java.util.Collection<java.lang.Double>,java.util.Collection<ComplexNumber>>
Modifier and Type | Class and Description |
---|---|
static class |
FourierTransform.Inverse
Evaluator that inverts a Fourier transform.
|
Constructor and Description |
---|
FourierTransform()
Creates a new instance of FourierTransform
|
Modifier and Type | Method and Description |
---|---|
protected static java.util.ArrayList<ComplexNumber> |
convertToComplex(java.util.Collection<java.lang.Double> data)
Converts the Collection of real data to complex numbers
|
protected static ComplexNumber[] |
cooleyTukeyFFT(java.util.ArrayList<ComplexNumber> data)
Computes the Cooley-Tukey Radix-2 Fast Fourier Transform (FFT).
|
static ComplexNumber[] |
discreteFourierTransform(java.util.ArrayList<java.lang.Double> data)
Computes the brute-force discrete Fourier transform of the input data.
|
protected static ComplexNumber[] |
discreteFourierTransformComplex(java.util.ArrayList<ComplexNumber> data)
Computes the brute-force discrete Fourier transform of the input data.
|
java.util.List<ComplexNumber> |
evaluate(java.util.Collection<java.lang.Double> data)
Computes the Fast Fourier Transform of the given input data using
the Cooley-Tukey Radix-2 FFT, with brute-force DFT computation on
odd subsequence computation.
|
static java.util.ArrayList<java.lang.Double> |
inverse(java.util.Collection<ComplexNumber> transformCoefficients)
Static function that inverts a Fourier transform.
|
clone
public FourierTransform()
protected static java.util.ArrayList<ComplexNumber> convertToComplex(java.util.Collection<java.lang.Double> data)
data
- Real data to convertpublic static ComplexNumber[] discreteFourierTransform(java.util.ArrayList<java.lang.Double> data)
data
- Real data to compute the FFT of.@PublicationReference(author="Wikipedia", title="Discrete Fourier transform", type=WebPage, year=2009, url="http://en.wikipedia.org/wiki/Discrete_Fourier_transform") protected static ComplexNumber[] discreteFourierTransformComplex(java.util.ArrayList<ComplexNumber> data)
data
- Data to compute the FFT of.@PublicationReference(author="Wikipedia",title="Cooley-Tukey FFT algorithm",type=WebPage,year=2009,url="http://en.wikipedia.org/wiki/Cooley-Tukey_FFT_algorithm") @PublicationReference(author={"Robert Sedgewick","Kevin Wayne"},title="FFT.java",type=WebPage,year=2007,url="http://www.cs.princeton.edu/introcs/97data/FFT.java.html") protected static ComplexNumber[] cooleyTukeyFFT(java.util.ArrayList<ComplexNumber> data)
data
- Data to compute the FFT of.public java.util.List<ComplexNumber> evaluate(java.util.Collection<java.lang.Double> data)
evaluate
in interface Evaluator<java.util.Collection<java.lang.Double>,java.util.Collection<ComplexNumber>>
data
- Input data to compute the FFT of.public static java.util.ArrayList<java.lang.Double> inverse(java.util.Collection<ComplexNumber> transformCoefficients)
transformCoefficients
- Transform coefficients to invert back into a scalar data set.