|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.alsUtility.Sample
holds doubles (called "datums") from a statistical sample and does simple statistics on them
Field Summary | |
protected java.util.Vector |
data
|
protected double |
mean
|
protected DoubleInterval |
range
|
protected double |
standardDeviation
|
protected boolean |
statisticsCorrect
|
protected double |
variance
|
Constructor Summary | |
Sample()
|
Method Summary | |
void |
addDatum(double d)
add datum d to the sample |
void |
calculate()
calculate (if necessary) and cache all statistics |
double |
datum(int i)
|
double |
getDatum(int i)
|
static java.lang.String |
getHeaderString()
|
double |
getHigh()
|
double |
getLow()
|
double |
getMean()
|
int |
getN()
|
double |
getRange()
|
double |
getStandardDeviation()
|
double |
getVariance()
|
void |
normalize(double by)
divides every value with by |
java.lang.String |
statisticsString()
|
static java.lang.String |
toString(Sample[] array)
|
static java.lang.String |
toString(Sample[][] array)
|
boolean |
valid()
is there enough data to calculate descriptive statistics? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector data
protected boolean statisticsCorrect
protected double mean
protected double variance
protected double standardDeviation
protected DoubleInterval range
Constructor Detail |
public Sample()
Method Detail |
public void addDatum(double d)
public double getDatum(int i)
public double datum(int i)
public void normalize(double by)
by
- value to divide every datum withpublic boolean valid()
public java.lang.String statisticsString()
public static java.lang.String getHeaderString()
public static java.lang.String toString(Sample[] array)
public static java.lang.String toString(Sample[][] array)
public void calculate()
public int getN()
public double getMean()
public double getStandardDeviation()
public double getVariance()
public double getRange()
public double getLow()
public double getHigh()
|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |