Browse Source

tweaked tests to pass (they should have passed before but there might be an issue with the precision class comparing really small numbers)

pull/65/head
Marcus Cuda 14 years ago
parent
commit
58a580b6a8
  1. 6
      src/UnitTests/LinearAlgebraTests/Complex32/Factorization/QRTests.cs
  2. 4
      src/UnitTests/LinearAlgebraTests/Single/Factorization/QRTests.cs

6
src/UnitTests/LinearAlgebraTests/Complex32/Factorization/QRTests.cs

@ -537,7 +537,8 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex32.Factorization
{
for (var j = 0; j < matrixB.ColumnCount; j++)
{
AssertHelpers.AlmostEqual(matrixB[i, j], matrixBReconstruct[i, j], 3);
Assert.AreEqual(matrixB[i, j].Real, matrixBReconstruct[i, j].Real, 1e-3);
Assert.AreEqual(matrixB[i, j].Imaginary, matrixBReconstruct[i, j].Imaginary, 1e-3);
}
}
@ -632,7 +633,8 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex32.Factorization
{
for (var j = 0; j < matrixB.ColumnCount; j++)
{
AssertHelpers.AlmostEqual(matrixB[i, j], matrixBReconstruct[i, j], 3);
Assert.AreEqual(matrixB[i, j].Real, matrixBReconstruct[i, j].Real, 1e-3);
Assert.AreEqual(matrixB[i, j].Imaginary, matrixBReconstruct[i, j].Imaginary, 1e-3);
}
}

4
src/UnitTests/LinearAlgebraTests/Single/Factorization/QRTests.cs

@ -526,7 +526,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Factorization
{
for (var j = 0; j < matrixB.ColumnCount; j++)
{
AssertHelpers.AlmostEqual(matrixB[i, j], matrixBReconstruct[i, j], 3);
Assert.AreEqual(matrixB[i, j], matrixBReconstruct[i, j], 1e-3);
}
}
@ -621,7 +621,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Factorization
{
for (var j = 0; j < matrixB.ColumnCount; j++)
{
AssertHelpers.AlmostEqual(matrixB[i, j], matrixBReconstruct[i, j], 3);
Assert.AreEqual(matrixB[i, j], matrixBReconstruct[i, j], 1e-3);
}
}

Loading…
Cancel
Save