예제 #1
0
        public void LMult()
        {
            Vector vector = new Vector(new double[] { 1, 1, 1 });

            var    resultTrueDiag       = skylineMatrix.LMult(vector, true);
            Vector resultActualTrueDiag = new Vector(new double[] { 1, 3, 8 });

            var    resultFalseDiag       = skylineMatrix.LMult(vector, false);
            Vector resultActualFalseDiag = new Vector(new double[] { 1, 2, 6 });

            for (int i = 0; i < resultTrueDiag.Size; i++)
            {
                Assert.Equal(resultTrueDiag[i], resultActualTrueDiag[i], 8);
                Assert.Equal(resultFalseDiag[i], resultActualFalseDiag[i], 8);
            }
        }