net.sf.jagg
Class CovariancePopAggregator
java.lang.Object
net.sf.jagg.Aggregator
net.sf.jagg.TwoPropAggregator
net.sf.jagg.AbstractCovarianceAggregator
net.sf.jagg.CovariancePopAggregator
public class CovariancePopAggregator
- extends AbstractCovarianceAggregator
This class represents the "population covariance" aggregator over two sets
of numeric values.
- Since:
- 0.1.0
- Author:
- Randy Gettman
Constructor Summary |
CovariancePopAggregator(java.lang.String properties)
Constructs a CovariancePopAggregator on the specified
properties, in the format: property, property2 . |
CovariancePopAggregator(java.lang.String property,
java.lang.String property2)
Constructs a CovariancePopAggregator that operates on the specified
properties. |
Method Summary |
CovariancePopAggregator |
replicate()
Returns an uninitialized copy of this Aggregator object,
with the same property(ies) to analyze. |
java.lang.Double |
terminate()
Return the population covariance by dividing the variance numerator by
n, where n is the number of non-null pairs of numbers
present in the aggregation. |
DoubleDouble |
terminateDoubleDouble()
Return the result as a DoubleDouble . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
CovariancePopAggregator
public CovariancePopAggregator(java.lang.String properties)
- Constructs a
CovariancePopAggregator
on the specified
properties, in the format: property, property2
.
- Parameters:
properties
- A specification string in the format:
property, property2
.
CovariancePopAggregator
public CovariancePopAggregator(java.lang.String property,
java.lang.String property2)
- Constructs a
CovariancePopAggregator
that operates on the specified
properties.
- Parameters:
property
- Determine the population covariance of this property with the other.property2
- Determine the population covariance of this property with the other.
replicate
public CovariancePopAggregator replicate()
- Returns an uninitialized copy of this
Aggregator
object,
with the same property(ies) to analyze.
- Specified by:
replicate
in class Aggregator
- Returns:
- An uninitialized copy of this
Aggregator
object.
terminate
public java.lang.Double terminate()
- Return the population covariance by dividing the variance numerator by
n, where n is the number of non-null pairs of numbers
present in the aggregation.
- Specified by:
terminate
in class Aggregator
- Returns:
- The population covariance as a
Double
,
NaN
if no values have been accumulated, or 0 if exactly
one value has been accumulated.
terminateDoubleDouble
public DoubleDouble terminateDoubleDouble()
- Return the result as a
DoubleDouble
. This is used mainly
when other Aggregators
that use this result must maintain a
high precision.
- Overrides:
terminateDoubleDouble
in class Aggregator
- Returns:
- The population covariance as a
DoubleDouble
,
NaN
if no values have been accumulated, or 0 if exactly
one value has been accumulated. - Since:
- 0.4.0
- See Also:
DoubleDouble
Copyright © 2010-2013 jAgg Team. All Rights Reserved.