示例#1
0
        public Gauss(int variablesCount, double[,] A, double[] B)
        {
            varCount = variablesCount;
            X        = new double[varCount];
            E        = new double[varCount];

            FirstStep = new GaussStep(varCount, A, B);
            ErrMsg    = "";
        }
示例#2
0
        private void NextStep_Click(object sender, EventArgs e)
        {
            int varCount = (int)this.VariablesCount.Value;

            if ((Engine != null) && (currentStepIndex < Engine.Steps.Count - 1))
            {
                currentStepIndex++;
                GaussStep currentStep = Engine.Steps[currentStepIndex];

                for (int i = 0; i < varCount; i++)
                {
                    this.BGrid[0, i].Value = currentStep.B[i];

                    for (int j = 0; j < varCount; j++)
                    {
                        this.AGrid[j, i].Value = currentStep.A[i, j];
                    }
                }
            }

            SetStepText();
        }