Ejemplo n.º 1
0
        public void IntConstructor()
        {
            int m = 3;
            SystemOfLinearEquation sle = new SystemOfLinearEquation(m);

            Assert.AreEqual("0=0\n0=0\n0=0\n", sle.ToString());
        }
Ejemplo n.º 2
0
        public void Triangular()
        {
            SystemOfLinearEquation sole = new SystemOfLinearEquation(3);

            sole[0] = new LinearEquation(new double[] { -8, -1, 1, 2 });
            sole[1] = new LinearEquation(new double[] { 11, 2, -1, -3 });
            sole[2] = new LinearEquation(new double[] { 3, 2, 1, -2 });
            sole.ToTriangular();
            Assert.AreEqual("2x3+1x2-1x1-8=0\n0,5x2+0,5x1-1=0\n-1x1-1=0\n", sole.ToString());
        }