@Test public void testMatrixInPlaceAddition() { R2x2 mat1 = R2x2.newIdentity(); R2x2 mat2 = R2x2.newIdentity(); mat1.plusEquals(mat2); Assert.assertTrue(mat1.isEquivalentTo(MAT_2)); // System.out.println("\nThe matrix in place addition test"); // System.out.println( mat1.toString() ); }
@Test public void testMatrixMultiplication() { R2x2 mat1 = R2x2.newIdentity(); R2x2 mat2 = R2x2.newIdentity(); R2x2 matProd = mat1.times(mat2); Assert.assertTrue(matProd.isEquivalentTo(MAT_I)); // System.out.println("\nThe matrix multiplication test"); // System.out.println( matProd.toString() ); }
@Test public void testMatrixAddition() { R2x2 mat1 = R2x2.newIdentity(); R2x2 mat2 = R2x2.newIdentity(); R2x2 matSum = mat1.plus(mat2); Assert.assertTrue(matSum.isEquivalentTo(MAT_2)); // System.out.println("\nThe matrix addition test"); // System.out.println( matSum.toString() ); }