public class MovingAveragePlugIn extends ConverterPlugIn
Changes the specified input serie data so that it becomes a moving average of itself. This plugin operates on specified serie/s of data in a vertical fashion.
For example if the serie to be converted contained the following data ....
and the requested moving average was set at 2 then the
serie would become
0
10
12.5
Any data prior to the moving
average spec is set at 0 as there is not enough data to calculate the actual
moving average. The data is NOT
normalised. To normalise the data use a NormalizerConverterPlugIn.
| Modifier and Type | Field and Description |
|---|---|
(package private) static long |
serialVersionUID |
pluginListeners| Constructor and Description |
|---|
MovingAveragePlugIn()
Default MovingAveragePlugIn constructor.
|
MovingAveragePlugIn(java.lang.String newAdvSerieSel,
java.lang.String newMovAvgSpec)
MovingAveragePlugIn constructor that allows specification of the Advanced Serie Selector
and the Moving Average Specification.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
convert(int serie)
Start the convertion to a moving average for the required serie.
|
java.lang.String |
getAdvancedMovAvgSpec()
Gets the Moving Average value/s requested by the user.
|
void |
setAdvancedMovAvgSpec(java.lang.String newAdvancedMovAvgSpec)
Sets the Moving Average value/s requested by the user.
|
isApplyEveryCycle, newCycle, setApplyEveryCycleaddPlugIn, addPlugInListener, apply, applyOnColumns, applyOnRows, cascade, check, convertPatterns, dataChanged, fireDataChanged, getAdvancedSerieSelector, getInputVector, getName, getNextPlugIn, getPluginListeners, getSerieIndexNumber, getSerieSelected, getValuePoint, isConnected, removeAllPlugIns, removePlugInListener, setAdvancedSerieSelector, setConnected, setInputVector, setName, setNextPlugin, setNextPlugInstatic final long serialVersionUID
public MovingAveragePlugIn()
public MovingAveragePlugIn(java.lang.String newAdvSerieSel,
java.lang.String newMovAvgSpec)
protected boolean convert(int serie)
convert in class AbstractConverterPlugInserie - the serie to convertpublic java.lang.String getAdvancedMovAvgSpec()
public void setAdvancedMovAvgSpec(java.lang.String newAdvancedMovAvgSpec)
newMovAvg - doubleSubmit Feedback to pmarrone@users.sourceforge.net