assertEquals(1.0, myMatrix.get(0, 0), EPSILON);
assertEquals(2.0, myMatrix.get(0, 1), EPSILON);
}
@Test
public void matrixToArray() {
Matrix myMatrix = new Matrix(2, 2);
myMatrix.set(0, 0, 1.0);
myMatrix.set(0, 1, 2.0);
myMatrix.set(1, 0, 3.0);
myMatrix.set(1, 1, 4.0);
double []myArray = myMatrix.toPackedArray();
assertEquals(4, myArray.length);
assertEquals(myArray[0], 1.0);
assertEquals(myArray[1], 2.0);
assertEquals(myArray[2], 3.0);
assertEquals(myArray[3], 4.0);