Package cern.colt.matrix.linalg

Examples of cern.colt.matrix.linalg.CholeskyDecomposition


   private void initL() {
      if (mu.length != sigma.rows() || mu.length != sigma.columns())
         throw new IllegalArgumentException
            ("Incompatible mean vector and covariance matrix");
      CholeskyDecomposition decomp = new CholeskyDecomposition (sigma);
      //if (!decomp.isSymmetricPositiveDefinite())
      //   throw new IllegalArgumentException
      //      ("The covariance matrix must be symmetric and positive-definite");
      sqrtSigma = decomp.getL();
   }
View Full Code Here


    */
   public void setSigma (DoubleMatrix2D sigma) {
      if (sigma.rows() != mu.length || sigma.columns() != mu.length)
         throw new IllegalArgumentException
            ("Invalid dimensions of covariance matrix");
      CholeskyDecomposition decomp = new CholeskyDecomposition (sigma);
      //if (!decomp.isSymmetricPositiveDefinite())
      //   throw new IllegalArgumentException
      //      ("The new covariance matrix must be symmetric and positive-definite");
      this.sigma.assign (sigma);
      this.sqrtSigma = decomp.getL();
   }
View Full Code Here

      if (mu.length != sigma.rows() ||
          mu.length != sigma.columns())
         throw new IllegalArgumentException
            ("Incompatible mean vector and covariance matrix dimensions");
      CholeskyDecomposition decomp = new CholeskyDecomposition (sigma);
      double[] temp = new double[mu.length];
      DoubleMatrix2D sqrtSigma = decomp.getL();
      for (int i = 0; i < temp.length; i++) {
         temp[i] = gen1.nextDouble();
         if (temp[i] == Double.NEGATIVE_INFINITY)
            temp[i] = -MYINF;
         if (temp[i] == Double.POSITIVE_INFINITY)
View Full Code Here

TOP

Related Classes of cern.colt.matrix.linalg.CholeskyDecomposition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.