Examples of toPackedArray()


Examples of org.matrix.Matrix.toPackedArray()

    }
    @Test
    public void rowMatrixToArray() {
        double []myinitMatrix = {1, 2, 3};
        Matrix myMatrix = Matrix.createRowMatrix(myinitMatrix);
        double []myArrayFromMatrix = myMatrix.toPackedArray();
        assertEquals(3, myArrayFromMatrix.length);
        assertEquals(myinitMatrix[0], myArrayFromMatrix[0], EPSILON);
        assertEquals(myinitMatrix[1], myArrayFromMatrix[1], EPSILON);
        assertEquals(myinitMatrix[2], myArrayFromMatrix[2], EPSILON);
    }
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.