|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectStatistics
Statistics.Delta
public static class Statistics.Delta
Holds some statistics about a series of sample values and the difference between them.
Given a series of sample values s0, s1,
s2, s3..., this class computes statistics
in the same way than Statistics and additionally computes statistics for
s1-s0,
s2-s1,
s3-s2...,
which are stored in a delta statistics object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Statistics |
|---|
Statistics.Delta |
| Constructor Summary | |
|---|---|
Statistics.Delta()
Constructs an initially empty set of statistics. |
|
Statistics.Delta(Statistics delta)
Constructs an initially empty set of statistics using the specified object for delta statistics. |
|
| Method Summary | |
|---|---|
void |
add(double sample)
Updates statistics for the specified sample. |
void |
add(long sample)
Updates statistics for the specified sample. |
void |
add(Statistics stats)
Update statistics with all samples from the specified stats. |
Statistics.Delta |
clone()
Returns a clone of this statistics. |
boolean |
equals(Object obj)
Tests this statistics with the specified object for equality. |
Statistics |
getDeltaStatistics()
Returns the statistics about difference between consecutives values. |
int |
hashCode()
Returns a hash code value for this statistics. |
void |
reset()
Resets the statistics to their initial NaN values. |
| Methods inherited from class Statistics |
|---|
configure, count, countNaN, getNumberFormat, maximum, mean, minimum, printTable, range, rms, standardDeviation, sum, toString, toString, writeTable |
| Methods inherited from class Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Statistics.Delta()
Double.NaN.
public Statistics.Delta(Statistics delta)
delta statistics. This method
allows chaining different kind of statistics objects. For example, one
could write:
Which would compute statistics of sample values, statistics of difference between consecutive sample values, and statistics of difference of difference between consecutive sample values. Other kinds ofnew Statistics.Delta(new Statistics.Delta());
Statistics object could be
chained as well.
delta - The object where to stores delta statistics.| Method Detail |
|---|
public Statistics getDeltaStatistics()
public void reset()
NaN values.
This method reset this object state as if it was just created.
reset in class Statisticspublic void add(double sample)
delta
statistics are updated with sample - samplelast value,
where samplelast is the last value given to the previous
call of an add(...) method.
add in class Statisticssample - The sample value. NaN values are ignored.Statistics.add(long),
Statistics.add(Statistics)public void add(long sample)
delta
statistics are updated with sample - samplelast value,
where samplelast is the last value given to the previous
call of an add(...) method.
add in class Statisticssample - The sample value.Statistics.add(double),
Statistics.add(Statistics)
public void add(Statistics stats)
throws ClassCastException
stats. Invoking this
method is equivalent (except for rounding errors) to invoking add
for all samples that were added to stats. The stats argument
must be an instance of Statistics.Delta.
add in class Statisticsstats - The statistics to be added to this,
or null if none.
ClassCastException - If stats is not an instance of
Statistics.Delta.public Statistics.Delta clone()
clone in class StatisticsObject.clone()public boolean equals(Object obj)
equals in class Statisticsobj - The object to compare with.
true if both objects are equal.public int hashCode()
hashCode in class Statistics
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||