Package com.nr.la

Examples of com.nr.la.LUdcmp.inverse()


     
    }

    // Test inverse
    double[][] ainv; // = buildMatrix(a); not need it
    ainv = alu.inverse();
    sbeps = 5.e-15;
    localflag = maxel(matsub(matmul(ainv,a),ident(a.length,1.))) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** ludcmp: Test of inverse failed");
View Full Code Here


    double[]a = new double[]{0.666667, 0.166667, -0.166667,
        2.16667, -0.0833333, -0.916667,
        -2.00000, 0.00000, 1.00000};
    double[][] aa = NRUtil.buildMatrix(3,3, a);
    LUdcmp lud = new LUdcmp(aa);
    double[][] inv = lud.inverse();
    System.out.println(NRUtil.toString(inv));
  }
}
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.