org.joone.util
Class MovingAveragePlugIn
- java.lang.Object
-
- org.joone.util.AbstractConverterPlugIn
-
- org.joone.util.ConverterPlugIn
-
- org.joone.util.MovingAveragePlugIn
-
- All Implemented Interfaces:
- java.io.Serializable, PlugInListener
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 ....
5
15
5
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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetAdvancedMovAvgSpec()Gets the Moving Average value/s requested by the user.voidsetAdvancedMovAvgSpec(java.lang.String newAdvancedMovAvgSpec)Sets the Moving Average value/s requested by the user.-
Methods inherited from class org.joone.util.ConverterPlugIn
isApplyEveryCycle, newCycle, setApplyEveryCycle
-
Methods inherited from class org.joone.util.AbstractConverterPlugIn
addPlugIn, addPlugInListener, check, convertPatterns, dataChanged, getAdvancedSerieSelector, getName, getNextPlugIn, isConnected, removeAllPlugIns, removePlugInListener, setAdvancedSerieSelector, setConnected, setInputVector, setName, setNextPlugin, setNextPlugIn
-
-
-
-
Constructor Detail
-
MovingAveragePlugIn
public MovingAveragePlugIn()
Default MovingAveragePlugIn constructor.
-
MovingAveragePlugIn
public MovingAveragePlugIn(java.lang.String newAdvSerieSel, java.lang.String newMovAvgSpec)MovingAveragePlugIn constructor that allows specification of the Advanced Serie Selector and the Moving Average Specification.
-
-
Method Detail
-
getAdvancedMovAvgSpec
public java.lang.String getAdvancedMovAvgSpec()
Gets the Moving Average value/s requested by the user.- Returns:
- double The moving average .
-
setAdvancedMovAvgSpec
public void setAdvancedMovAvgSpec(java.lang.String newAdvancedMovAvgSpec)
Sets the Moving Average value/s requested by the user. It must be a comma delimeted list of moving average values. E.g 10,20,12 would request a moving average 10 in the first specified serie as in the Advanced Serie Selector then a moving average of 20 on the second and a moving average of 12 on the third.- Parameters:
newMovAvg- double
-
-
DataMelt 3.0 © DataMelt by jWork.ORG