Exemple #1
0
        public void LSolve()
        {
            di            = new double[] { 1, 2, 3 };
            au            = new double[] { 1, 2, 3 };
            al            = new double[] { 3, 2, 1 };
            ia            = new int[] { 1, 1, 2, 4 };
            skylineMatrix = new SkylineMatrix(di, ia, al, au);


            Vector vector = new Vector(new double[] { 1, 5, 17 });

            var    result       = skylineMatrix.LSolve(vector, true);
            Vector resultActual = new Vector(new double[] { 1, 1, 4.66666666667 });

            for (int i = 0; i < result.Size; i++)
            {
                Assert.Equal(result[i], resultActual[i], 8);
            }
        }