public abstract class Variable extends Object
Can be used to add new statistical calculations with RRD values.
| Modifier and Type | Class and Description |
|---|---|
static class | Variable.AVERAGECalculate the average of the data points. |
(package private) static class | Variable.ComparPercentElemenThe sort used by rrdtool for percent, where NaN < -INF < finite values < INF |
static class | Variable.FIRSTFind the first valid data point and it's timestamp |
static class | Variable.LASTFind the first last valid point and it's timestamp |
static class | Variable.LSLCORRELCalculate the correlation coefficient of the least squares line. |
static class | Variable.LSLINTCalculate the y-intercept of the least squares line. |
static class | Variable.LSLSLOPECalculate the slop of the least squares line. |
static class | Variable.MAXThe biggest of the data points and it's time stamp (the first one) is stored. |
static class | Variable.MINThe smallest of the data points and it's time stamp (the first one) is stored. |
(package private) static class | Variable.PercentElemStore all the informations about a datasource point, for predictive and consistent sorting |
static class | Variable.PERCENTILEFind the point at the n-th percentile. |
static class | Variable.PERCENTILENANPERCENTILENAN class. |
static class | Variable.STDDEVCalculate the standard deviation for the data point. |
static class | Variable.TOTALCalculate the sum of the data points. |
static class | Variable.ValueThis class store both the value and the time stamp It will be used by graph rendering legend |
| Modifier and Type | Field and Description |
|---|---|
static Variable.Value | INVALIDVALUERepresents an invalid value with NaN (Not a Number) value. |
| Modifier | Constructor and Description |
|---|---|
protected | Variable()Base constructor for Variable subclasses |
| Modifier and Type | Method and Description |
|---|---|
(package private) void | calculate(Source s,
long start,
long end)Used to calculate the needed value from a source, this method call the abstract method fill(long[], double[], long, long). |
protected abstract Variable.Value | fill(long[] timestamps,
double[] values,
long start,
long end)This method is call with the needed values, extracted from the datasource to do the
calculation. |
Variable.Value | getValue()getValue. |
public static final Variable.Value INVALIDVALUE
void calculate(Source s, long start, long end)
fill(long[], double[], long, long).s -start -end -protected abstract Variable.Value fill(long[] timestamps, double[] values, long start, long end)
Value is to be filled with both the double value and a possible timestamp, when it's used to find a specific point
timestamps - the timestamps for the valuevalues - the actual valuesstart - the start of the periodend - the end of the periodpublic Variable.Value getValue()