public void MultiplyTest()
{
MatrixH A = new MatrixH();
MatrixH B = new MatrixH();
MatrixH expected = new MatrixH();
MatrixH actual = A.Multiply(B);
Assert.IsTrue(Accord.Math.Matrix.IsEqual(
expected.Elements, actual.Elements));
double[,] a =
{
{ 2, 3, 1 },
{ 2, 1, 7 },
{ 1, 2, 2 }
};
double[,] b =
{
{ 1, 3, 1 },
{ -2, 1, -4 },
{ 1, -1, 3 }
};
A = new MatrixH(a);
B = new MatrixH(b);
actual = A.Multiply(B);
expected = new MatrixH(Accord.Math.Matrix.Multiply(a, b));
Assert.IsTrue(Accord.Math.Matrix.IsEqual(
(double[,])actual, (double[,])expected,
0.001));
}