Ejemplo n.º 1
0
        private void btnOpenInputForm_Click(object sender, EventArgs e)
        {
            FInput fInput = new FInput();

            if (DialogResult.OK == fInput.ShowDialog())
            {
                mOriginal            = new MatrixContainer();
                mOriginal.baseMatrix = (double[, ])fInput.GetMatrix().Clone();
                mOriginal.matrix     = fInput.GetMatrix();
                mOriginal.vecX       = fInput.GetXVector();
                mOriginal.p          = new int[mOriginal.matrix.GetLength(0)];
                mOriginal.q          = new int[mOriginal.matrix.GetLength(0)];

                rtbOutput.Text += logic.MatrixToString(mOriginal.matrix, "Исходная матрица");
                rtbOutput.Text += logic.MatrixToString(mOriginal.vecX, "Исходный вектор X");
            }

            //mOriginal = new MatrixContainer();
            //mOriginal.baseMatrix = (double[,])testMatrix.Clone();
            //mOriginal.matrix = testMatrix;
            //mOriginal.vecX = new double[] { 1, 2, 3, 4 };
            //mOriginal.p = new int[testMatrix.GetLength(0)];
            //mOriginal.q = new int[testMatrix.GetLength(0)];


            //rtbOutput.Text += logic.MatrixToString(mOriginal.matrix, "Исходная матрица");
            //rtbOutput.Text += logic.MatrixToString(mOriginal.vecX, "Исходный вектор X");
        }
Ejemplo n.º 2
0
        public void SLAQ(MatrixContainer matrix)
        {
            double[] b = matMath.FindVecB(matrix.baseMatrix, matrix.vecX);

            matrix.vecX = matMath.SLAQ(matrix.matrix, matrix.p, matrix.q, b);
        }
Ejemplo n.º 3
0
 public void Factorization(MatrixContainer matrix)
 {
     matrix.matrix = matMath.Factorization(matrix.matrix, ref matrix.p, ref matrix.q);
 }