public Direto2(ElicitationParameters p, IFormPrincipal ifPrincipal)
        {
            InitializeComponent();
            this.ifPrincipal = ifPrincipal;
            this.question    = this.ifPrincipal.getQuestion();
            this.p           = p.getClone();

            this.p.max = p.max;
            this.p.min = p.min;
            this.upperOfLowerInterval = p.upperOfLowerInterval;
            this.lowerOfUpperInterval = p.lowerOfUpperInterval;
            this.p.center             = p.center;
            this.p.cred         = p.cred;
            this.p.index        = p.index;
            this.p.iteracao     = p.iteracao + 1;
            this.times          = p.times;
            this.answers        = p.answers;
            this.statistics     = p.statistics;
            this.W              = p.W;
            this.x              = p.x;
            this.k              = p.k;
            this.numberInterval = k;
            this.intervalSize   = (p.min + p.max) / p.k;

            initMethod2();
            this.loadConfigMethodForVariable();

            this.configChartSeriesDirect(p.min, p.max, p.k);
        }
        public Bisection(ElicitationParameters p, IFormPrincipal ifPrincipal) : base()
        {
            InitializeComponent();
            this.ifPrincipal = ifPrincipal;
            this.question    = this.ifPrincipal.getQuestion();
            this.p           = p.getClone();

            //this.upperOfLowerInterval = p.upperOfLowerInterval;
            //this.lowerOfUpperInterval = p.lowerOfUpperInterval;
            this.lowerOfUpperInterval = new List <double> ();
            this.upperOfLowerInterval = new List <double> ();
            //this.center = p.center;
            this.p.cred     = p.cred;
            this.p.index    = p.index;
            this.p.iteracao = p.iteracao + 1;
            this.times      = p.times;
            this.answers    = p.answers;
            this.statistics = p.statistics;
            this.x          = p.x;

            if (ifPrincipal.isTrainingPhase())  //Permitir apenas uma iteração caso seja treinamento.
            //List<double> lines = new List<double>();
            //this.ifPrincipal.markChoosableAreaChartSeries(lines);
            {
                if (this.p.iteracao > 1)
                {
                    this.RB_semPreferencia.Enabled = false;
                    this.TR_mdSearch.Enabled       = false;
                }
            }
            else
            {
                if (this.p.iteracao >= 4)
                {
                    this.RB_semPreferencia.Enabled = false;
                    this.TR_mdSearch.Enabled       = false;
                }
            }

            this.intervals = this.x.ToList();

            showMainPanel(p.min, p.center, p.max, this.p.cred, this.p.index);
            this.loadConfigMethodForVariable();

            List <double> lines = new List <double>();

            lines.Add(this.p.min);
            lines.Add(this.p.center);
            lines.Add(this.p.max);
            this.ifPrincipal.markChoosableAreaChartSeries(lines);
        }
示例#3
0
        //private Variable variable;

        //Construtor
        public Firmino(ElicitationParameters p, IFormPrincipal ifPrincipal)
        {
            this.ifPrincipal = ifPrincipal;
            this.question    = this.ifPrincipal.getQuestion();
            this.p           = p.getClone();
            //Este if indica que o método só fará três interações.
            if (p.iteracao >= 3)
            {
                this.BT_Update.Enabled = false;
            }
            else
            {
                this.BT_Update.Enabled = true;
            }

            showMainPanel(p.min, p.center, p.max, p.cred, p.index);
            this.loadConfigMethodForVariable();
        }