|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataPoint
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(String name)
Returns the current value assigned to the named independent variable. |
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(String name,
double value)
Sets the named independent variables' value to the given value. |
Method Detail |
---|
void setDependentValue(double value)
value
- the new value for the dependent variable.double getDependentValue()
void setIndependentValue(String name, double value)
value
- the new value for the dependent variable.double getIndependentValue(String name)
name
- the name of the independent variable required.
String[] getIndependentVariableNames()
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 |