|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jagg.Aggregator
net.sf.jagg.AbstractVarianceAggregator
public abstract class AbstractVarianceAggregator
This abstract class represents variance-like aggregator calculations over numeric values.
| Field Summary | |
|---|---|
protected long |
myCount
A running count of items processed so far for the given property. |
protected DoubleDouble |
mySum
A running total of items processed so far for the given property. |
protected DoubleDouble |
myVarNumerator
A running total of the variance, before it is divided by the denominator in the variance calculation. |
| Fields inherited from class net.sf.jagg.Aggregator |
|---|
PROP_SELF |
| Constructor Summary | |
|---|---|
AbstractVarianceAggregator(java.lang.String property)
Constructs an VarianceAggregator that operates on the specified
property. |
|
| Method Summary | |
|---|---|
void |
init()
Initialize the sum and count to zero. |
void |
iterate(java.lang.Object value)
If the property is non-null, then count it and add the property value to the sum. |
void |
merge(Aggregator agg)
Merge the given Aggregator into this one. |
abstract DoubleDouble |
terminateDoubleDouble()
Return the result as a DoubleDouble. |
| Methods inherited from class net.sf.jagg.Aggregator |
|---|
equals, getAggregator, getAggregator, getProperty, getValueFromProperty, hashCode, isInUse, replicate, setInUse, setProperty, terminate, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected long myCount
protected DoubleDouble mySum
protected DoubleDouble myVarNumerator
| Constructor Detail |
|---|
public AbstractVarianceAggregator(java.lang.String property)
VarianceAggregator that operates on the specified
property.
property - Calculate the variance of this property's values.| Method Detail |
|---|
public void init()
init in class Aggregatorpublic void iterate(java.lang.Object value)
iterate in class Aggregatorvalue - The value to aggregate.Aggregator.getValueFromProperty(java.lang.Object, java.lang.String)public void merge(Aggregator agg)
Aggregator into this one. Add the
respective sums and counts together. Update the variance numerator.
merge in class Aggregatoragg - The Aggregator to merge into this one.public abstract DoubleDouble terminateDoubleDouble()
DoubleDouble. This is used mainly
when other Aggregators that use this result must maintain a
high precision.
terminateDoubleDouble in class AggregatorDoubleDouble representing the result of the
aggregation.DoubleDouble
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||