double c[][] = {
{5,1},
{4,2}
};
Matrix matrixA = new Matrix(a);
Matrix matrixB = new Matrix(b);
Matrix matrixC = new Matrix(c);
Matrix result = matrixA.clone();
result = MatrixMath.multiply(matrixA,matrixB);
TestCase.assertTrue(result.equals(matrixC));
double a2[][] = {
{1,2,3,4},
{5,6,7,8}
};
double b2[][] = {
{1,2,3},
{4,5,6},
{7,8,9},
{10,11,12}
};
double c2[][] = {
{70,80,90},
{158,184,210}
};
matrixA = new Matrix(a2);
matrixB = new Matrix(b2);
matrixC = new Matrix(c2);
result = MatrixMath.multiply(matrixA, matrixB);
TestCase.assertTrue(result.equals(matrixC));
result = matrixB.clone();
try
{
MatrixMath.multiply(matrixB,matrixA);