Class VectorialCovariance
java.lang.Object
org.apache.commons.math3.stat.descriptive.moment.VectorialCovariance
- All Implemented Interfaces:
Serializable
Returns the covariance matrix of the available vectors.
- Since:
- 1.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVectorialCovariance
(int dimension, boolean isBiasCorrected) Constructs a VectorialCovariance. -
Method Summary
-
Constructor Details
-
VectorialCovariance
public VectorialCovariance(int dimension, boolean isBiasCorrected) Constructs a VectorialCovariance.- Parameters:
dimension
- vectors dimensionisBiasCorrected
- if true, computed the unbiased sample covariance, otherwise computes the biased population covariance
-
-
Method Details
-
increment
Add a new vector to the sample.- Parameters:
v
- vector to add- Throws:
DimensionMismatchException
- if the vector does not have the right dimension
-
getResult
Get the covariance matrix.- Returns:
- covariance matrix
-
getN
public long getN()Get the number of vectors in the sample.- Returns:
- number of vectors in the sample
-
clear
public void clear()Clears the internal state of the Statistic -
hashCode
public int hashCode() -
equals
-