public void AbsTest()
{
double[,] value =
{
{ -1.0, 2.1 },
{ 0.1, -0.7 }
};
double[,] expected =
{
{ 1.0, 2.1 },
{ 0.1, 0.7 }
};
double[,] actual = Matrix.Abs(value);
Assert.IsTrue(actual.IsEqual(expected));
int[,] ivalue =
{
{ -1, 2 },
{ 0, -6 }
};
int[,] iexpected =
{
{ 1, 2 },
{ 0, 6 }
};
int[,] iactual = Matrix.Abs(ivalue);
Assert.IsTrue(iactual.IsEqual(iexpected));
int[] avalue = { -1, 2 };
int[] aexpected = { 1, 2 };
int[] aactual = Matrix.Abs(avalue);
Assert.IsTrue(aactual.IsEqual(aexpected));
}