org.akutan.utilities
Class Covariance

java.lang.Object
  extended by org.akutan.utilities.Covariance

public class Covariance
extends java.lang.Object

Various functions to computes covariance matrices

Since:
23 january 2009

Constructor Summary
Covariance()
           
 
Method Summary
static double covariance(cern.colt.list.DoubleArrayList l1, cern.colt.list.DoubleArrayList l2)
          Compute the sample covariance of the series in the two lists
static double exponentialCovariance(double factor, cern.colt.list.DoubleArrayList l1, cern.colt.list.DoubleArrayList l2)
          Compute the sample exponentially weighted covariance of the series in the two lists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Covariance

public Covariance()
Method Detail

covariance

public static double covariance(cern.colt.list.DoubleArrayList l1,
                                cern.colt.list.DoubleArrayList l2)
Compute the sample covariance of the series in the two lists

Parameters:
l1 - List of time series points
l2 - List of time series points
Returns:
covariance between the two lists

exponentialCovariance

public static double exponentialCovariance(double factor,
                                           cern.colt.list.DoubleArrayList l1,
                                           cern.colt.list.DoubleArrayList l2)
Compute the sample exponentially weighted covariance of the series in the two lists

Parameters:
factor - Exponential weighting factor
l1 - List of time series points
l2 - List of time series points
Returns:
exponentially weighted covariance between the two lists