Class CovarianceOps_FDRM


  • public class CovarianceOps_FDRM
    extends java.lang.Object
    Contains operations specific to covariance matrices.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static float TOL  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean invert​(org.ejml.data.FMatrixRMaj cov)
      Performs a matrix inversion operations that takes advantage of the special properties of a covariance matrix.
      static boolean invert​(org.ejml.data.FMatrixRMaj cov, org.ejml.data.FMatrixRMaj cov_inv)
      Performs a matrix inversion operations that takes advantage of the special properties of a covariance matrix.
      static int isValid​(org.ejml.data.FMatrixRMaj cov)
      Performs a variety of tests to see if the provided matrix is a valid covariance matrix.
      static boolean isValidFast​(org.ejml.data.FMatrixRMaj cov)
      This is a fairly light weight check to see of a covariance matrix is valid.
      static void randomVector​(org.ejml.data.FMatrixRMaj cov, org.ejml.data.FMatrixRMaj vector, java.util.Random rand)
      Sets vector to a random value based upon a zero-mean multivariate Gaussian distribution with covariance 'cov'.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TOL

        public static float TOL
    • Constructor Detail

      • CovarianceOps_FDRM

        public CovarianceOps_FDRM()
    • Method Detail

      • isValidFast

        public static boolean isValidFast​(org.ejml.data.FMatrixRMaj cov)
        This is a fairly light weight check to see of a covariance matrix is valid. It checks to see if the diagonal elements are all positive, which they should be if it is valid. Not all invalid covariance matrices will be caught by this method.
        Returns:
        true if valid and false if invalid
      • isValid

        public static int isValid​(org.ejml.data.FMatrixRMaj cov)
        Performs a variety of tests to see if the provided matrix is a valid covariance matrix.
        Returns:
        0 = is valid 1 = failed positive diagonal, 2 = failed on symmetry, 2 = failed on positive definite
      • invert

        public static boolean invert​(org.ejml.data.FMatrixRMaj cov)
        Performs a matrix inversion operations that takes advantage of the special properties of a covariance matrix.
        Parameters:
        cov - On input it is a covariance matrix, on output it is the inverse. Modified.
        Returns:
        true if it could invert the matrix false if it could not.
      • invert

        public static boolean invert​(org.ejml.data.FMatrixRMaj cov,
                                     org.ejml.data.FMatrixRMaj cov_inv)
        Performs a matrix inversion operations that takes advantage of the special properties of a covariance matrix.
        Parameters:
        cov - A covariance matrix. Not modified.
        cov_inv - The inverse of cov. Modified.
        Returns:
        true if it could invert the matrix false if it could not.
      • randomVector

        public static void randomVector​(org.ejml.data.FMatrixRMaj cov,
                                        org.ejml.data.FMatrixRMaj vector,
                                        java.util.Random rand)
        Sets vector to a random value based upon a zero-mean multivariate Gaussian distribution with covariance 'cov'. If repeat calls are made to this class, consider using CovarianceRandomDraw_FDRM instead.
        Parameters:
        cov - The distirbutions covariance. Not modified.
        vector - The random vector. Modified.
        rand - Random number generator.