org.apache.commons.math3.stat.descriptive.moment
public class VectorialCovariance extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
private boolean |
isBiasCorrected
Indicator for bias correction.
|
private long |
n
Number of vectors in the sample.
|
private double[] |
productsSums
Sums of products for each component.
|
private static long |
serialVersionUID
Serializable version identifier
|
private double[] |
sums
Sums for each component.
|
Constructor and Description |
---|
VectorialCovariance(int dimension,
boolean isBiasCorrected)
Constructs a VectorialCovariance.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the internal state of the Statistic
|
boolean |
equals(Object obj) |
long |
getN()
Get the number of vectors in the sample.
|
RealMatrix |
getResult()
Get the covariance matrix.
|
int |
hashCode() |
void |
increment(double[] v)
Add a new vector to the sample.
|
private static final long serialVersionUID
private final double[] sums
private final double[] productsSums
private final boolean isBiasCorrected
private long n
public VectorialCovariance(int dimension, boolean isBiasCorrected)
dimension
- vectors dimensionisBiasCorrected
- if true, computed the unbiased sample covariance,
otherwise computes the biased population covariancepublic void increment(double[] v) throws DimensionMismatchException
v
- vector to addDimensionMismatchException
- if the vector does not have the right dimensionpublic RealMatrix getResult()
public long getN()
public void clear()
Copyright (c) 2003-2013 Apache Software Foundation