Package com.nr.la

Examples of com.nr.la.Cholesky.solve()


    // Test cholesky
    System.out.println("Testing cholesky");
    double[][] aposdef = matmul(a,transpose(a));
    Cholesky ach  = new Cholesky(aposdef);
    ach.solve(r,y);
    sbeps = 5.e-15;
    localflag = maxel(vecsub(matmul(aposdef,y),r)) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** cholesky: Error in solve() method");
View Full Code Here


    double[][] inv = new double[3][3];
    double[] b = new double[]{2.0, 4.0,1.0};
    double[] x = new double[3];
   
    Cholesky ch = new Cholesky(aa);
    ch.solve(b, x);
    System.out.println(NRUtil.toString(x));
    ch.elsolve(b, x);
    System.out.println(NRUtil.toString(x));
    System.out.println(ch.logdet());
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.