Package org.jquantlib.math.matrixutilities

Examples of org.jquantlib.math.matrixutilities.Matrix.offset()


        final Matrix m = mA.addAssign(mB);
        if (m != mA) {
            fail("addAssign must return <this>");
        }

        final int offset = m.offset();
        for (int row=offset; row<m.rows()+offset; row++) {
            for (int col=offset; col<m.cols()+offset; col++) {
                if (m.get(row, col) != row-offset+5) {
                    fail("addAssign failed");
                }
View Full Code Here


        final Matrix m = mB.subAssign(mA);
        if (m != mB) {
            fail("subAssign must return <this>");
        }

        final int offset = m.offset();
        for (int row=offset; row<m.rows()+offset; row++) {
            for (int col=offset; col<m.cols()+offset; col++) {
                if (m.get(row, col) != row-offset+3) {
                    fail("subAssign failed");
                }
View Full Code Here

        final Matrix m = mA.mulAssign(2.5);
        if (m != mA) {
            fail("mulAssign must return <this>");
        }

        final int offset = m.offset();
        for (int row=offset; row<m.rows()+offset; row++) {
            for (int col=offset; col<m.cols()+offset; col++) {
                if (!Closeness.isClose(m.get(row, col), (col-offset+1)*2.5)) {
                    fail("mulAssign failed");
                }
View Full Code Here

        final Matrix m = mA.divAssign(2.5);
        if (m != mA) {
            fail("divAssign must return <this>");
        }

        final int offset = m.offset();
        for (int row=offset; row<m.rows()+offset; row++) {
            for (int col=offset; col<m.cols()+offset; col++) {
                if (!Closeness.isClose(m.get(row, col), (col-offset+1)/2.5)) {
                    fail("divAssign failed");
                }
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.