Package net.fec.openrq.util.linearalgebra.matrix

Examples of net.fec.openrq.util.linearalgebra.matrix.ByteMatrix.columns()


    public void testCreateConstantMatrix_3x3() {

        ByteMatrix a = factory().createConstantMatrix(3, 3, (byte)10);

        assertEquals(3, a.rows());
        assertEquals(3, a.columns());

        for (int i = 0; i < a.rows(); i++) {
            for (int j = 0; j < a.columns(); j++) {
                assertEquals(10, a.get(i, j));
            }
View Full Code Here


        assertEquals(3, a.rows());
        assertEquals(3, a.columns());

        for (int i = 0; i < a.rows(); i++) {
            for (int j = 0; j < a.columns(); j++) {
                assertEquals(10, a.get(i, j));
            }
        }
    }
View Full Code Here

    public void testCreateConstantMatrix_2x5() {

        ByteMatrix a = factory().createConstantMatrix(2, 5, (byte)20);

        assertEquals(2, a.rows());
        assertEquals(5, a.columns());

        for (int i = 0; i < a.rows(); i++) {
            for (int j = 0; j < a.columns(); j++) {
                assertEquals(20, a.get(i, j));
            }
View Full Code Here

        assertEquals(2, a.rows());
        assertEquals(5, a.columns());

        for (int i = 0; i < a.rows(); i++) {
            for (int j = 0; j < a.columns(); j++) {
                assertEquals(20, a.get(i, j));
            }
        }
    }
View Full Code Here

    public void testCreateConstantMatrix_4x1() {

        ByteMatrix a = factory().createConstantMatrix(4, 1, (byte)30);

        assertEquals(4, a.rows());
        assertEquals(1, a.columns());

        for (int i = 0; i < a.rows(); i++) {
            for (int j = 0; j < a.columns(); j++) {
                assertEquals(a.get(i, j), 30);
            }
View Full Code Here

        assertEquals(4, a.rows());
        assertEquals(1, a.columns());

        for (int i = 0; i < a.rows(); i++) {
            for (int j = 0; j < a.columns(); j++) {
                assertEquals(a.get(i, j), 30);
            }
        }
    }
View Full Code Here

    public void testCreateRandomSymmetricMatrix() {

        ByteMatrix a = factory().createRandomSymmetricMatrix(5);

        for (int i = 0; i < a.rows(); i++) {
            for (int j = i; j < a.columns(); j++) {
                assertEquals(a.get(i, j), a.get(j, i));
            }
        }
    }
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.