|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.openforecast.Observation
Represents a single observation or data point, consisting of one value of a dependent variable, and one or more values of independent variables. Note that an Observation can refer to a previously observed data value, or a future forecast value (an expected Observation).
| Constructor Summary | |
Observation(DataPoint dataPoint)
Like a copy constructor, but constructs a new Observation object by making a copy of the values from the given data point. |
|
Observation(double dependentValue)
Initializes the current Observation with the given value of the dependent variable. |
|
| Method Summary | |
boolean |
equals(DataPoint dp)
Compares the given DataPoint to the current DataPoint/Observation, 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. |
java.lang.String |
toString()
Overrides the default toString method to provide a more meaningful output of an Observation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Observation(double dependentValue)
dependentValue - the initial value of the dependent variable.public Observation(DataPoint dataPoint)
dataPoint - the data point that is to be copied.| Method Detail |
public void setDependentValue(double value)
setDependentValue in interface DataPointvalue - the new value for the dependent variable.public double getDependentValue()
getDependentValue in interface DataPoint
public void setIndependentValue(java.lang.String name,
double value)
setIndependentValue in interface DataPointvalue - the new value for the dependent variable.public double getIndependentValue(java.lang.String name)
getIndependentValue in interface DataPointname - the name of the independent variable required.
public java.lang.String[] getIndependentVariableNames()
getIndependentVariableNames in interface DataPointpublic boolean equals(DataPoint dp)
equals in interface DataPointdp - the DataPoint to compare this DataPoint/Observation object
to.
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||