|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Defines the interface to a single data point, consisting of one value of a dependent variable, and one or more values of independent variables. Note that a data point can refer to a previously observed data value, or a future forecast value.
Note that in earlier versions DataPoint was defined as a class (not an interface). Therefore any code written using OpenForecast 0.20 or earlier that instantiates DataPoint objects directly will need to be modified. Use the Observation class instead.
Observation| Method Summary | |
boolean |
equals(DataPoint dp)
Compares the given DataPoint object to the current DataPoint object, and returns true if, and only if, the two data points represent the same data point. |
double |
getDependentValue()
Returns the current value assigned to the dependent variable. |
double |
getIndependentValue(java.lang.String name)
Returns the current value assigned to the named independent variable. |
java.lang.String[] |
getIndependentVariableNames()
Returns an array of all independent variable names. |
void |
setDependentValue(double value)
Sets the dependent variables' value to the given value. |
void |
setIndependentValue(java.lang.String name,
double value)
Sets the named independent variables' value to the given value. |
| Method Detail |
public void setDependentValue(double value)
value - the new value for the dependent variable.public double getDependentValue()
public void setIndependentValue(java.lang.String name,
double value)
value - the new value for the dependent variable.public double getIndependentValue(java.lang.String name)
name - the name of the independent variable required.
public java.lang.String[] getIndependentVariableNames()
public boolean equals(DataPoint dp)
dp - the DataPoint to compare this DataPoint object to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||