Package adams.data.filter
Interface Filter<T extends DataContainer>
-
- Type Parameters:
T
- the data type to pass through the filter
- All Superinterfaces:
CleanUpHandler
,Comparable
,Destroyable
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Filter>
- All Known Subinterfaces:
BatchFilter<T>
,TrainableBatchFilter<T>
- All Known Implementing Classes:
AbstractAutocorrelation
,AbstractBatchFilter
,AbstractDatabaseConnectionFilter
,AbstractDerivative
,AbstractEquiDistance
,AbstractEquiDistanceWithOffset
,AbstractFastWavelet
,AbstractFFT
,AbstractFilter
,AbstractHistogram
,AbstractLOWESS
,AbstractPreFilter
,AbstractSavitzkyGolay
,AbstractSAX
,AbstractScript
,AbstractScriptedFilter
,AbstractSimpleSavitzkyGolay
,BaselineCorrection
,DownSample
,DownSize
,Groovy
,MultiFilter
,OutlierDetector
,PassThrough
,RemoveNoise
,ReportFilter
,Scripted
,Smoothing
,TimeseriesAutocorrelation
,TimeseriesChangeResolution
,TimeseriesDerivative
,TimeseriesEquiDistance
,TimeseriesFastWavelet
,TimeseriesFFT
,TimeseriesHistogram
,TimeseriesLOWESS
,TimeseriesResetTimestamps
,TimeseriesRound
,TimeseriesRowNorm
,TimeseriesSavitzkyGolay
,TimeseriesSAX
,TimeseriesSetStart
,TimeseriesShiftTimestamps
,TimeseriesShiftValues
,TimeseriesValueSubset
,TimeseriesWindow
public interface Filter<T extends DataContainer> extends Comparable, LoggingSupporter, LoggingLevelHandler, CleanUpHandler, ShallowCopySupporter<Filter>, OptionHandler
Interface for filters. Derived classes only have to override theprocessData()
method. Thereset()
method can be used to reset an algorithms internal state, e.g., after setting options, which invalidate the previously generated data.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.int
compareTo(Object o)
Compares this object with the specified object for order.void
destroy()
Frees up memory in a "destructive" non-reversible way.String
dontUpdateIDTipText()
Returns the tip text for this property.boolean
equals(Object o)
Returns whether the two objects are the same.T
filter(T data)
Returns the filtered data.boolean
getDontUpdateID()
Returns whether ID update is suppressed.void
reset()
Resets the filter.void
setDontUpdateID(boolean value)
Sets whether ID update is suppressed.Filter<T>
shallowCopy()
Returns a shallow copy of itself, i.e., based on the commandline options.Filter<T>
shallowCopy(boolean expand)
Returns a shallow copy of itself, i.e., based on the commandline options.-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
setDontUpdateID
void setDontUpdateID(boolean value)
Sets whether ID update is suppressed.- Parameters:
value
- true if to suppress
-
getDontUpdateID
boolean getDontUpdateID()
Returns whether ID update is suppressed.- Returns:
- true if suppressed
-
dontUpdateIDTipText
String dontUpdateIDTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
reset
void reset()
Resets the filter. Derived classes must call this method in set-methods of parameters to assure the invalidation of previously generated data.
-
cleanUp
void cleanUp()
Cleans up data structures, frees up memory. Sets the input and generated data to null.- Specified by:
cleanUp
in interfaceCleanUpHandler
-
destroy
void destroy()
Frees up memory in a "destructive" non-reversible way.
Calls cleanUp() and cleans up the options.- Specified by:
destroy
in interfaceDestroyable
-
filter
T filter(T data)
Returns the filtered data.- Parameters:
data
- the data to filter- Returns:
- the filtered data
-
compareTo
int compareTo(Object o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Only compares the commandlines of the two objects.- Specified by:
compareTo
in interfaceComparable<T extends DataContainer>
- Parameters:
o
- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
ClassCastException
- if the specified object's type prevents it from being compared to this object.
-
equals
boolean equals(Object o)
Returns whether the two objects are the same.
Only compares the commandlines of the two objects.
-
shallowCopy
Filter<T> shallowCopy()
Returns a shallow copy of itself, i.e., based on the commandline options.- Specified by:
shallowCopy
in interfaceShallowCopySupporter<T extends DataContainer>
- Returns:
- the shallow copy
-
shallowCopy
Filter<T> shallowCopy(boolean expand)
Returns a shallow copy of itself, i.e., based on the commandline options.- Specified by:
shallowCopy
in interfaceShallowCopySupporter<T extends DataContainer>
- Parameters:
expand
- whether to expand variables to their current values- Returns:
- the shallow copy
-
-