Package adams.data.smoothing
Class AbstractSlidingWindow<T extends DataContainer>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.smoothing.AbstractSmoother<T>
-
- adams.data.smoothing.AbstractSlidingWindow<T>
-
- Type Parameters:
T
- the type of data to process
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractSmoother>
,SizeOfHandler
,Serializable
,Comparable
- Direct Known Subclasses:
TimeseriesSlidingWindow
public abstract class AbstractSlidingWindow<T extends DataContainer> extends AbstractSmoother<T>
Abstract sliding window smoother.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractSlidingWindow.Measure
The type of measure to use for computing the "smoothed" points in the sliding window.-
Nested classes/interfaces inherited from class adams.data.smoothing.AbstractSmoother
AbstractSmoother.SmootherJob<T extends DataContainer>
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractSlidingWindow.Measure
m_Measure
the type of measure to use.protected int
m_WindowSize
the window size.-
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 AbstractSlidingWindow()
-
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.AbstractSlidingWindow.Measure
getMeasure()
Returns the current measure in use.protected abstract Double
getValue(DataPoint point)
Returns the X-value of the data point.int
getWindowSize()
Returns the window size for determining the 'smoothed' abundances.String
measureTipText()
Returns the tip text for this property.protected T
processData(T data)
Performs the actual smoothing.void
setMeasure(AbstractSlidingWindow.Measure value)
Sets the measure to use.void
setWindowSize(int value)
Sets the window size for determining the 'smoothed' abundances.protected abstract void
updatePoint(DataPoint point, double value)
Updates the X-value of the data point.String
windowSizeTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.smoothing.AbstractSmoother
checkData, cleanUp, compareTo, destroy, equals, forCommandLine, forName, getSmoothers, reset, shallowCopy, shallowCopy, smooth
-
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
-
-
-
-
Field Detail
-
m_WindowSize
protected int m_WindowSize
the window size.
-
m_Measure
protected AbstractSlidingWindow.Measure m_Measure
the type of measure to use.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setWindowSize
public void setWindowSize(int value)
Sets the window size for determining the 'smoothed' abundances.- Parameters:
value
- the window size
-
getWindowSize
public int getWindowSize()
Returns the window size for determining the 'smoothed' abundances.- Returns:
- the window size
-
windowSizeTipText
public String windowSizeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setMeasure
public void setMeasure(AbstractSlidingWindow.Measure value)
Sets the measure to use.- Parameters:
value
- the measure
-
getMeasure
public AbstractSlidingWindow.Measure getMeasure()
Returns the current measure in use.- Returns:
- the measure
-
measureTipText
public String measureTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
getValue
protected abstract Double getValue(DataPoint point)
Returns the X-value of the data point.- Parameters:
point
- the point to get the X-value from- Returns:
- the X-value
-
updatePoint
protected abstract void updatePoint(DataPoint point, double value)
Updates the X-value of the data point.- Parameters:
point
- the point to updatevalue
- the value to update the point with
-
processData
protected T processData(T data)
Performs the actual smoothing.- Specified by:
processData
in classAbstractSmoother<T extends DataContainer>
- Parameters:
data
- the to smooth- Returns:
- the smoothed data
-
-