Package adams.data.filter
Class AbstractDerivative<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.AbstractDerivative<T>
-
- Type Parameters:
T
- the type of data to filter
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Filter>
,SizeOfHandler
,Filter<T>
,Serializable
,Comparable
- Direct Known Subclasses:
TimeseriesDerivative
public abstract class AbstractDerivative<T extends DataContainer> extends AbstractFilter<T>
Abstract ancestor for Derivative filters.- 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
AbstractDerivative.Point
Container class for abundance and timestamp in double format.-
Nested classes/interfaces inherited from class adams.data.filter.AbstractFilter
AbstractFilter.FilterJob<T extends DataContainer>
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Order
the order of the derivative.protected double
m_ScalingRange
the range to scale the abundances to after each derivation step.-
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 AbstractDerivative()
-
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 List<AbstractDerivative.Point>
derive(List<AbstractDerivative.Point> data)
Generates the next derivative from the GC data.int
getOrder()
Returns the order of the derivative to calculate.double
getScalingRange()
Returns the scaling range the abundances are scaled to after each derivation step (= 0 means no scaling; -1 sets scaling to input range).String
orderTipText()
Returns the tip text for this property.protected T
processData(T data)
Performs the actual filtering.String
scalingRangeTipText()
Returns the tip text for this property.void
setOrder(int value)
Sets the order of the derivative to calculate.void
setScalingRange(double value)
Sets the range to scale the abundances to after each derivation step (= 0 turns scaling off; -1 sets scaling to input range).protected abstract DataPoint
toDataPoint(AbstractDerivative.Point point)
Turns the intermediate format point back into a DataPoint.protected abstract AbstractDerivative.Point
toPoint(DataPoint point)
Turns the DataPoint into the intermediate format.-
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
-
-
-
-
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>
-
setOrder
public void setOrder(int value)
Sets the order of the derivative to calculate.- Parameters:
value
- the order
-
getOrder
public int getOrder()
Returns the order of the derivative to calculate.- Returns:
- the order
-
orderTipText
public String orderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setScalingRange
public void setScalingRange(double value)
Sets the range to scale the abundances to after each derivation step (= 0 turns scaling off; -1 sets scaling to input range).- Parameters:
value
- the range
-
getScalingRange
public double getScalingRange()
Returns the scaling range the abundances are scaled to after each derivation step (= 0 means no scaling; -1 sets scaling to input range).- Returns:
- the range
-
scalingRangeTipText
public String scalingRangeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
derive
protected List<AbstractDerivative.Point> derive(List<AbstractDerivative.Point> data)
Generates the next derivative from the GC data.- Parameters:
data
- the data to derive- Returns:
- the derived data
-
toPoint
protected abstract AbstractDerivative.Point toPoint(DataPoint point)
Turns the DataPoint into the intermediate format.- Parameters:
point
- the DataPoint to convert- Returns:
- the generated intermediate format point
-
toDataPoint
protected abstract DataPoint toDataPoint(AbstractDerivative.Point point)
Turns the intermediate format point back into a DataPoint.- Parameters:
point
- the intermediate format point to convert- Returns:
- the generated DataPoint
-
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
-
-