Exemplo n.º 1
0
        public Gauss(int n, double[,] A)
        {
            this.n = n;
            this.A = A;

            UserConsole.PrintNumber("Порядок системы, n", n);
            UserConsole.PrintMatrix("Матрица системы, A", A, n);
        }
Exemplo n.º 2
0
        public Gauss(int n, double[,] A, double[] b)
        {
            this.n = n;
            this.A = A;
            this.b = b;

            UserConsole.PrintNumber("Порядок системы, n", n);
            UserConsole.PrintMatrix("Матрица системы, A", A, n);
            UserConsole.PrintVector("Правая часть системы, b", b);
        }
Exemplo n.º 3
0
 public void Triangle()
 {
     for (int i = 0; i < n; i++)
     {
         for (int j = i + 1; j < n; j++)
         {
             double koef = A[j, i] / A[i, i];
             for (int k = i; k < n; k++)
             {
                 A[j, k] = A[j, k] - A[i, k] * koef;
             }
         }
     }
     UserConsole.PrintMatrix("Треугольная матрица", A, n);
 }