public void SolveTest()
{
float[][] value =
{
new float[] { 2, 3, 0 },
new float[] { -1, 2, 1 },
new float[] { 0, -1, 3 }
};
float[][] rhs =
{
new float[] { 1, 2, 3 },
new float[] { 3, 2, 1 },
new float[] { 5, 0, 1 },
};
float[][] expected =
{
new float[] { -0.2174f, -0.1739f, 0.6522f },
new float[] { 0.4783f, 0.7826f, 0.5652f },
new float[] { 1.8261f, 0.2609f, 0.5217f },
};
JaggedLuDecompositionF target = new JaggedLuDecompositionF(value);
float[][] actual = target.Solve(rhs);
Assert.IsTrue(Matrix.IsEqual(expected, actual, 0.001f));
}