org.apache.commons.math.stat.correlation
Class StorelessCovariance
java.lang.Object
org.apache.commons.math.stat.correlation.Covariance
org.apache.commons.math.stat.correlation.StorelessCovariance
public class StorelessCovariance
- extends Covariance
Covariance implementation that does not require input data to be
stored in memory.
- Since:
- 3.0
- Version:
- $Id: StorelessCovariance.java 1178235 2011-10-02 19:43:17Z luc $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StorelessCovariance
public StorelessCovariance(int rowDimension,
int colDimension)
StorelessCovariance
public StorelessCovariance(int rowDimension,
int colDimension,
boolean biasCorrected)
getCovariance
public StorelessBivariateCovariance getCovariance(int xIndex,
int yIndex)
setCovariance
public void setCovariance(int xIndex,
int yIndex,
StorelessBivariateCovariance cov)
incrementCovariance
public void incrementCovariance(int xIndex,
int yIndex,
double x,
double y)
incrementRow
public void incrementRow(double[] rowData)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getCovarianceMatrix
public RealMatrix getCovarianceMatrix()
throws java.lang.IllegalArgumentException
- Description copied from class:
Covariance
- Returns the covariance matrix
- Overrides:
getCovarianceMatrix in class Covariance
- Returns:
- covariance matrix
- Throws:
java.lang.IllegalArgumentException
getData
public double[][] getData()
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getN
public int getN()
throws MathUnsupportedOperationException
- This
Covariance method is not supported by StorelessCovariance, since
the number of bivariate observations does not have to be the same for different
pairs of covariates - i.e., N as defined in Covariance.getN() is undefined.
- Overrides:
getN in class Covariance
- Returns:
- nothing as this implementation always throws a
MathUnsupportedOperationException
- Throws:
MathUnsupportedOperationException - in all cases
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.