Package Jama

Examples of Jama.Matrix.minus()


        print("\nTesting array-like methods...\n");
        S = new Matrix(columnwise, nonconformld);
        R = Matrix.random(A.getRowDimension(), A.getColumnDimension());
        A = R;
        try {
            S = A.minus(S);
            errorCount = try_failure(errorCount, "minus conformance check... ",
                    "nonconformance not raised");
        } catch (IllegalArgumentException e) {
            try_success("minus conformance check... ", "");
        }
View Full Code Here


            errorCount = try_failure(errorCount, "minus conformance check... ",
                    "nonconformance not raised");
        } catch (IllegalArgumentException e) {
            try_success("minus conformance check... ", "");
        }
        if (A.minus(R).norm1() != 0.) {
            errorCount = try_failure(errorCount, "minus... ",
                    "(difference of identical Matrices is nonzero,\nSubsequent use of minus should be suspect)");
        } else {
            try_success("minus... ", "");
        }
View Full Code Here

                    "minusEquals conformance check... ",
                    "nonconformance not raised");
        } catch (IllegalArgumentException e) {
            try_success("minusEquals conformance check... ", "");
        }
        if (A.minus(Z).norm1() != 0.) {
            errorCount = try_failure(errorCount, "minusEquals... ",
                    "(difference of identical Matrices is nonzero,\nSubsequent use of minus should be suspect)");
        } else {
            try_success("minusEquals... ", "");
        }
View Full Code Here

            try_success("minusEquals... ", "");
        }

        A = R.copy();
        B = Matrix.random(A.getRowDimension(), A.getColumnDimension());
        C = A.minus(B);
        try {
            S = A.plus(S);
            errorCount = try_failure(errorCount, "plus conformance check... ",
                    "nonconformance not raised");
        } catch (IllegalArgumentException e) {
View Full Code Here

            try_success("plus... ", "");
        } catch (java.lang.RuntimeException e) {
            errorCount = try_failure(errorCount, "plus... ",
                    "(C = A - B, but C + B != A)");
        }
        C = A.minus(B);
        C.plusEquals(B);
        try {
            A.plusEquals(S);
            errorCount = try_failure(errorCount,
                    "plusEquals conformance check... ",
View Full Code Here

            A.print(FILE, fmt, 10);
            FILE.close();
            R = Matrix.read(
                    new BufferedReader(new FileReader("JamaTestMatrix.out")));
            if (A.minus(R).norm1() < .001) {
                try_success("print()/read()...", "");
            } else {
                errorCount = try_failure(errorCount, "print()/read()...",
                        "Matrix read from file does not match Matrix printed to file");
            }
View Full Code Here

                A.print(FILE, fmt, 10);
                FILE.close();
                R = Matrix.read(
                        new BufferedReader(new FileReader("JamaTestMatrix.out")));
                if (A.minus(R).norm1() < .001) {
                    try_success("print()/read()...", "");
                } else {
                    errorCount = try_failure(errorCount,
                            "print()/read() (2nd attempt) ...",
                            "Matrix read from file does not match Matrix printed to file");
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.