|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.data.MovingAverage
A utility class for calculating moving averages of time series data.
Constructor Summary | |
MovingAverage()
|
Method Summary | |
static TimeSeries |
createMovingAverage(TimeSeries source,
java.lang.String name,
int periodCount,
int skip)
Creates a new TimeSeries containing moving average values for the given series. |
static XYSeries |
createMovingAverage(XYDataset source,
int series,
java.lang.String name,
long periodMilliseconds,
long skipMilliseconds)
Creates a new XYDataset containing the moving averages of one series in the
source dataset. |
static XYDataset |
createMovingAverage(XYDataset source,
java.lang.String suffix,
long periodMilliseconds,
long skipMilliseconds)
Creates a new XYDataset containing the moving averages of each series in the
source dataset. |
static TimeSeries |
createPointMovingAverage(TimeSeries source,
java.lang.String name,
int pointCount)
Creates a new TimeSeries containing moving average values for the given series,
calculated by number of points (irrespective of the 'age' of those points). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MovingAverage()
Method Detail |
public static TimeSeries createMovingAverage(TimeSeries source, java.lang.String name, int periodCount, int skip)
TimeSeries
containing moving average values for the given series.
If the series is empty (contains zero items), the result is an empty series.
source
- the source series.name
- the name of the new series.periodCount
- the number of periods used in the average calculation.skip
- the number of initial periods to skip.
public static XYDataset createMovingAverage(XYDataset source, java.lang.String suffix, long periodMilliseconds, long skipMilliseconds)
XYDataset
containing the moving averages of each series in the
source
dataset.
source
- the source dataset.suffix
- the string to append to source series names to create target series names.periodMilliseconds
- the averaging period (in milliseconds).skipMilliseconds
- the length of the initial skip period.
public static XYSeries createMovingAverage(XYDataset source, int series, java.lang.String name, long periodMilliseconds, long skipMilliseconds)
XYDataset
containing the moving averages of one series in the
source
dataset.
source
- the source dataset.series
- the series index (zero based).name
- the name for the new series.periodMilliseconds
- the averaging period (in milliseconds).skipMilliseconds
- the length of the initial skip period.
public static TimeSeries createPointMovingAverage(TimeSeries source, java.lang.String name, int pointCount)
TimeSeries
containing moving average values for the given series,
calculated by number of points (irrespective of the 'age' of those points).
If the series is empty (contains zero items), the result is an empty series.
Developed by Benoit Xhenseval (www.ObjectLab.co.uk).
source
- the source series.name
- the name of the new series.pointCount
- the number of POINTS used in the average calculation (not periods!)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |