Examples of solveFor()


Examples of org.jquantlib.methods.finitedifferences.TridiagonalOperator.solveFor()

        final Array rhs = new Array(3);
        rhs.set(0, 7);
        rhs.set(1, 8);
        rhs.set(2, 7);

        final Array solved = t.solveFor(rhs);
        final Array expected = new Array(new double[] { 20.0, -33.285714285714285, 13.428571428571429 });

        for (int i=0; i<3; i++) {
            final double error = Math.abs(solved.get(i) - expected.get(i));
            if (error > 1e-15) {
View Full Code Here

Examples of org.jquantlib.methods.finitedifferences.TridiagonalOperator.solveFor()

                  default:
                    throw new LibraryException("unknown end condition");
                }

                // solve the system
                tmp = L.solveFor(tmp);
            } else { // local schemes
                if (n==2) {
                    tmp[0] = tmp[1] = S[0];
                } else {
                    switch (da) {
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.