|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beadsproject.beads.analysis.FeatureExtractor<float[],float[]>
net.beadsproject.beads.analysis.featureextractors.FFT
public class FFT
FFT performs a Fast Fourier Transform and forwards half of the real part of the data to any listeners.
Field Summary | |
---|---|
protected float[] |
fftImag
The imaginary part. |
protected float[] |
fftReal
The real part. |
protected java.util.ArrayList<FeatureExtractor<?,float[]>> |
listeners
|
Fields inherited from class net.beadsproject.beads.analysis.FeatureExtractor |
---|
featureDescriptions, features, name, numFeatures |
Constructor Summary | |
---|---|
FFT()
Instantiates a new FFT. |
Method Summary | |
---|---|
void |
addListener(FeatureExtractor<?,float[]> fe)
Adds a FeatureExtractor as a listener. |
protected static float[] |
calculateImaginary(float[] spectrum,
int length)
Gets the imaginary part from the complex spectrum. |
protected static float[] |
calculateReal(float[] spectrum,
int length)
Gets the real part from the complex spectrum. |
protected static void |
fft(float[] data,
int n,
boolean isign)
Perform FFT on data with given length, regular or inverse. |
void |
process(float[] data)
Process some data of type P (specified by the class def). |
Methods inherited from class net.beadsproject.beads.analysis.FeatureExtractor |
---|
getFeatureDescriptions, getFeatures, getName, getNumberOfFeatures, setName, setNumberOfFeatures |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList<FeatureExtractor<?,float[]>> listeners
protected float[] fftReal
protected float[] fftImag
Constructor Detail |
---|
public FFT()
Method Detail |
---|
public void process(float[] data)
FeatureExtractor
process
in class FeatureExtractor<float[],float[]>
data
- the data.public void addListener(FeatureExtractor<?,float[]> fe)
the
- FeatureExtractor.protected static float[] calculateReal(float[] spectrum, int length)
spectrum
- complex spectrum.length
- length of data to use.
protected static float[] calculateImaginary(float[] spectrum, int length)
spectrum
- complex spectrum.length
- length of data to use.
protected static void fft(float[] data, int n, boolean isign)
data
- the data.length
- the length.isign
- true for regular, false for inverse.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |