コード例 #1
0
        public override void Execute()
        {
            OneDimMethod step1 = new Bolzano(F, Df, Eps, 5);
            OneDimMethod step2 = new GoldenRatio1(F, Eps);

            IterationCount = 0;

            //ШАГ 2
            step1.A = A;
            step1.B = B;
            step1.Execute();

            A = step1.A;
            B = step1.B;

            //ШАГ 3
            step2.A = A;
            step2.B = B;
            step2.Execute();

            A = step2.A;
            B = step2.B;
            Answer = step2.Answer;

            IterationCount += step1.IterationCount;
            IterationCount += step2.IterationCount;
        }
コード例 #2
0
        public override void Execute()
        {
            OneDimMethod step1 = new Bolzano(F, Df, Eps, 3);
            OneDimMethod step2 = new Paul(F, Df, Eps, 3);
            IterationCount = 0;
            //ШАГ 1
            SetSvenInterval();

            //ШАГ 2
            step1.A = A;
            step1.B = B;
            step1.Execute();

            A = step1.A;
            B = step1.B;

            //ШАГ 3
            step2.A = A;
            step2.B = B;
            step2.Execute();

            A = step2.A;
            B = step2.B;
            Answer = step2.Answer;

            IterationCount += step1.IterationCount;
            IterationCount += step2.IterationCount;
        }