Package adams.data.filter
Class AbstractHistogram<T extends DataContainer>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.AbstractFilter<T>
-
- adams.data.filter.AbstractHistogram<T>
-
- Type Parameters:
T
- the type of container to process
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Filter>
,SizeOfHandler
,Filter<T>
,Serializable
,Comparable
- Direct Known Subclasses:
TimeseriesHistogram
public abstract class AbstractHistogram<T extends DataContainer> extends AbstractFilter<T>
Ancestor for filters that generate a histogram from the incoming data.- Version:
- $Revision: 1286 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.data.filter.AbstractFilter
AbstractFilter.FilterJob<T extends DataContainer>
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayHistogram
m_Histogram
the array histogram setup to use.-
Fields inherited from class adams.data.filter.AbstractFilter
m_DontUpdateID
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractHistogram()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected ArrayHistogram
getDefaultHistogram()
Returns the default setup for the array histogram.ArrayHistogram
getHistogram()
Returns the array histogram setup to use.protected abstract double
getY(DataPoint point)
Obtains the Y value from the given data point.String
histogramTipText()
Returns the tip text for this property.protected abstract DataPoint
newDataPoint(int index, double y)
Creates a new data point from the X and Y values.protected T
processData(T data)
Performs the actual filtering.void
setHistogram(ArrayHistogram value)
Sets the array histogram setup to use.-
Methods inherited from class adams.data.filter.AbstractFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, getDontUpdateID, reset, setDontUpdateID, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Histogram
protected ArrayHistogram m_Histogram
the array histogram setup to use.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractFilter<T extends DataContainer>
-
getDefaultHistogram
protected ArrayHistogram getDefaultHistogram()
Returns the default setup for the array histogram.- Returns:
- the default
-
setHistogram
public void setHistogram(ArrayHistogram value)
Sets the array histogram setup to use.- Parameters:
value
- the setup
-
getHistogram
public ArrayHistogram getHistogram()
Returns the array histogram setup to use.- Returns:
- the setup
-
histogramTipText
public String histogramTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getY
protected abstract double getY(DataPoint point)
Obtains the Y value from the given data point.- Parameters:
point
- the data point to extract the Y value from- Returns:
- the Y value
-
newDataPoint
protected abstract DataPoint newDataPoint(int index, double y)
Creates a new data point from the X and Y values.- Parameters:
index
- the index in the histogramy
- the raw Y value- Returns:
- the data point
-
processData
protected T processData(T data)
Performs the actual filtering.- Specified by:
processData
in classAbstractFilter<T extends DataContainer>
- Parameters:
data
- the data to filter- Returns:
- the filtered data
-
-