//TODO: узнать что такое касты
        public override void Execute()
        {
            OneDimMethod step1 = new Dichotomy(F, Eps, 3);
            OneDimMethod step2 = new Newton(F, Df, null, Eps, 3);

            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;
        }
Beispiel #2
0
        public override void Execute()
        {
            OneDimMethod step1 = new Dichotomy(F, Eps, 5);
            OneDimMethod step2 = new BoostedDavidon(F, Df, Eps);
            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;
        }