public static int isValid ( DMatrixRMaj cov ) { if ( ! MatrixFeatures_DDRM . isDiagonalPositive ( cov ) ) return 1 ; if ( ! MatrixFeatures_DDRM . isSymmetric ( cov , TOL ) ) return 2 ; if ( ! MatrixFeatures_DDRM . isPositiveSemidefinite ( cov ) ) return 3 ; return 0 ; }
Performs a variety of tests to see if the provided matrix is a valid covariance matrix .