public void SolveTest3()
{
float[][] value = // positive-definite
{
new float[] { 2, -1, 0 },
new float[] { -1, 2, -1 },
new float[] { 0, -1, 2 }
};
JaggedCholeskyDecompositionF chol = new JaggedCholeskyDecompositionF(value);
float[][] L = chol.LeftTriangularFactor;
float[] B = new float[] { 1, 2, 3 };
float[] expected = new float[] { 2.5f, 4.0f, 3.5f };
float[] actual = chol.Solve(B);
Assert.IsTrue(Matrix.IsEqual(expected, actual, 1e-5f));
actual = chol.Solve(B, true);
Assert.AreEqual(actual, B);
Assert.IsTrue(Matrix.IsEqual(expected, B, 1e-5f));
}