Covariance

The following routines compute the covariance matrix

\[S := \frac{1}{n-1} \sum_{j=0}^{n-1} (d_j-\bar d) (d_j-\bar d)^H,\]

where \(\bar d\) is the average of the \(n\) observations (the columns of \(D\)).

C++ API

void Covariance(const Matrix<F> &D, Matrix<F> &S)
void Covariance(const ElementalMatrix<F> &D, ElementalMatrix<F> &S)

C API

ElError ElCovariance_s(ElConstMatrix_s D, ElMatrix_s S)
ElError ElCovariance_d(ElConstMatrix_d D, ElMatrix_d S)
ElError ElCovariance_c(ElConstMatrix_c D, ElMatrix_c S)
ElError ElCovariance_z(ElConstMatrix_z D, ElMatrix_z S)
ElError ElCovarianceDist_s(ElConstDistMatrix_s D, ElDistMatrix_s S)
ElError ElCovarianceDist_d(ElConstDistMatrix_d D, ElDistMatrix_d S)
ElError ElCovarianceDist_c(ElConstDistMatrix_c D, ElDistMatrix_c S)
ElError ElCovarianceDist_z(ElConstDistMatrix_z D, ElDistMatrix_z S)