|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.statistics.Moments
A class for encapsulating and computing statistical moments (expectation, variance/standard deviation).
| Constructor Summary | |
Moments()
Creates a new, empty instance. |
|
Moments(double exp,
double var)
Creates a new instance and sets the moments directly. |
|
Moments(java.util.List values)
Creates a new instance and computes the moments from the sample values. |
|
| Method Summary | |
double |
get(int index)
Returns the sample value at the specified index. |
double |
getExpectation()
Returns the expectation. |
double[] |
getMoments()
Returns an array with the moments. |
double |
getStandardDeviation()
Returns the standard deviation. |
java.util.List |
getValues()
Returns the sample values. |
double |
getVariance()
Returns the variance. |
void |
setExpectation(double expectation)
Sets the expectation. |
void |
setValues(java.util.List values)
Sets the sample values. |
void |
setVariance(double variance)
Sets the variance. |
int |
size()
Returns the number of sample values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Moments()
public Moments(double exp,
double var)
exp - expectationvar - variancepublic Moments(java.util.List values)
values - sample values| Method Detail |
public double getStandardDeviation()
public double[] getMoments()
public int size()
public double get(int index)
index - index
public double getExpectation()
public void setExpectation(double expectation)
expectation - expectation to set.public java.util.List getValues()
public void setValues(java.util.List values)
values - values to set.public double getVariance()
public void setVariance(double variance)
variance - variance to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||