marf.FeatureExtraction.FFT
Class FFT

java.lang.Object
  extended by marf.Storage.StorageManager
      extended by marf.FeatureExtraction.FeatureExtraction
          extended by marf.FeatureExtraction.FFT.FFT
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IFeatureExtraction, IStorageManager

public class FFT
extends FeatureExtraction

Class FFT implements Fast Fourier Transform.

$Id: FFT.java,v 1.55 2006/12/28 06:01:57 mokhov Exp $

Since:
0.0.1
Version:
$Revision: 1.55 $
Author:
Stephen Sinclair, Serguei Mokhov
See Also:
Serialized Form

Field Summary
static int DEFAULT_CHUNK_SIZE
          Default number (1024) of doubles per chunk in the window.
protected  int iChunkSize
          FFT chunk size.
 
Fields inherited from class marf.FeatureExtraction.FeatureExtraction
adFeatures, oFeatureSet, oPreprocessing
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.FeatureExtraction.IFeatureExtraction
MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Storage.IStorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS
 
Constructor Summary
FFT(IPreprocessing poPreprocessing)
          FFT Constructor.
 
Method Summary
 boolean extractFeatures()
          FFT Implementation of extractFeatures().
 boolean extractFeatures(double[] padSampleData)
          Extracts features from the provided sample array.
protected  boolean extractFeaturesImplementation(Sample poSample)
          Does the actual business logic of the FFT feature extraction.
 int getChunkSize()
          Allows getting the current chunk size.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 int setChunkSize(int piChunkSize)
          Allows setting a non-default chunk size.
 
Methods inherited from class marf.FeatureExtraction.FeatureExtraction
backSynchronizeObject, clone, getFeaturesArray, getPreprocessing, setPreprocessing
 
Methods inherited from class marf.Storage.StorageManager
dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, getObjectToSerialize, hashCode, restore, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_CHUNK_SIZE

public static final int DEFAULT_CHUNK_SIZE
Default number (1024) of doubles per chunk in the window. Feature vector will be half of the chunk size.

See Also:
Constant Field Values

iChunkSize

protected int iChunkSize
FFT chunk size. Must be a power of 2.

Since:
0.3.0.4
Constructor Detail

FFT

public FFT(IPreprocessing poPreprocessing)
FFT Constructor.

Parameters:
poPreprocessing - Preprocessing module reference
Throws:
java.lang.ClassCastException - if a feature extraction module parameter supplied and is not of type Integer
java.lang.IllegalArgumentException - if the chunk size parameter is less than 1 or not a power of 2
Method Detail

extractFeatures

public final boolean extractFeatures()
                              throws FeatureExtractionException
FFT Implementation of extractFeatures(). Sample is taken from an IPreprocessing module from the pipeline.

Specified by:
extractFeatures in interface IFeatureExtraction
Overrides:
extractFeatures in class FeatureExtraction
Returns:
true if there were features extracted, false otherwise
Throws:
FeatureExtractionException - in case of any errors while doing stuff
See Also:
IFeatureExtraction.extractFeatures()

extractFeatures

public final boolean extractFeatures(double[] padSampleData)
                              throws FeatureExtractionException
Extracts features from the provided sample array.

Parameters:
padSampleData - the sample to extract features from
Returns:
boolean true if there were features extracted, false otherwise
Throws:
FeatureExtractionException - if there was an error while extracting features
Since:
0.3.0.6
See Also:
IFeatureExtraction.extractFeatures(double[])

extractFeaturesImplementation

protected final boolean extractFeaturesImplementation(Sample poSample)
                                               throws FeatureExtractionException
Does the actual business logic of the FFT feature extraction.

Parameters:
poSample - sample to extract features from
Returns:
true if there were features extracted, false otherwise
Throws:
FeatureExtractionException - in case of any errors while doing stuff
Since:
0.3.0.6

setChunkSize

public int setChunkSize(int piChunkSize)
Allows setting a non-default chunk size. Must be a power of 2.

Parameters:
piChunkSize - new chunk size
Returns:
the old value of the chunk size (in case some callers are interested in backing it up)
Throws:
java.lang.IllegalArgumentException - if the chunk size parameter is less than 1 or not a power of 2
Since:
0.3.0.4

getChunkSize

public int getChunkSize()
Allows getting the current chunk size.

Returns:
the current chunk size
Since:
0.3.0.4

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string
Since:
0.3.0.2


SourceForge Logo