Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/08 13:23:29 (17 years ago)
Author:
abeham
Message:

Renamed variables in TestFunctionInjector (ticket #91)

Location:
trunk/sources/HeuristicLab.TestFunctions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.TestFunctions/TestFunctionInjector.cs

    r106 r109  
    3939    }
    4040
    41     public double Minimum {
    42       get { return GetVariable("Minimum").GetValue<DoubleData>().Data; }
    43       set { GetVariable("Minimum").Value = new DoubleData(value); }
     41    public double LowerBound {
     42      get { return GetVariable("LowerBound").GetValue<DoubleData>().Data; }
     43      set { GetVariable("LowerBound").Value = new DoubleData(value); }
    4444    }
    4545
    46     public double Maximum {
    47       get { return GetVariable("Maximum").GetValue<DoubleData>().Data; }
    48       set { GetVariable("Maximum").Value = new DoubleData(value); }
     46    public double UpperBound {
     47      get { return GetVariable("UpperBound").GetValue<DoubleData>().Data; }
     48      set { GetVariable("UpperBound").Value = new DoubleData(value); }
    4949    }
    5050
    51     public int Length {
    52       get { return GetVariable("Length").GetValue<IntData>().Data; }
    53       set { GetVariable("Length").Value = new IntData(value); }
     51    public int Dimension {
     52      get { return GetVariable("Dimension").GetValue<IntData>().Data; }
     53      set { GetVariable("Dimension").Value = new IntData(value); }
    5454    }
    5555
     
    5959      AddVariable(new Variable("Minimum", new DoubleData(-32.76)));
    6060      AddVariable(new Variable("Maximum", new DoubleData(32.76)));
    61       AddVariable(new Variable("Length", new IntData(2)));
     61      AddVariable(new Variable("Dimension", new IntData(2)));
    6262    }
    6363
    6464    public override IOperation Apply(IScope scope) {
    6565      scope.AddVariable((IVariable)GetVariable("Maximization").Clone());
    66       scope.AddVariable((IVariable)GetVariable("Minimum").Clone());
    67       scope.AddVariable((IVariable)GetVariable("Maximum").Clone());
    68       scope.AddVariable((IVariable)GetVariable("Length").Clone());
     66      scope.AddVariable((IVariable)GetVariable("LowerBound").Clone());
     67      scope.AddVariable((IVariable)GetVariable("UpperBound").Clone());
     68      scope.AddVariable((IVariable)GetVariable("Dimension").Clone());
    6969      return null;
    7070    }
  • trunk/sources/HeuristicLab.TestFunctions/TestFunctionInjectorView.Designer.cs

    r106 r109  
    2929      this.maximizationCheckBox = new System.Windows.Forms.CheckBox();
    3030      this.dimensionTextBox = new System.Windows.Forms.TextBox();
    31       this.minimumTextBox = new System.Windows.Forms.TextBox();
    32       this.maximumTextBox = new System.Windows.Forms.TextBox();
     31      this.lowerBoundTextBox = new System.Windows.Forms.TextBox();
     32      this.upperBoundTextBox = new System.Windows.Forms.TextBox();
    3333      this.SuspendLayout();
    3434      //
     
    3737      this.DimensionLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    3838      this.DimensionLabel.AutoSize = true;
    39       this.DimensionLabel.Location = new System.Drawing.Point(4, 29);
     39      this.DimensionLabel.Location = new System.Drawing.Point(3, 29);
    4040      this.DimensionLabel.Name = "DimensionLabel";
    4141      this.DimensionLabel.Size = new System.Drawing.Size(59, 13);
     
    4747      this.MinimumLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    4848      this.MinimumLabel.AutoSize = true;
    49       this.MinimumLabel.Location = new System.Drawing.Point(4, 55);
     49      this.MinimumLabel.Location = new System.Drawing.Point(3, 55);
    5050      this.MinimumLabel.Name = "MinimumLabel";
    51       this.MinimumLabel.Size = new System.Drawing.Size(51, 13);
     51      this.MinimumLabel.Size = new System.Drawing.Size(73, 13);
    5252      this.MinimumLabel.TabIndex = 3;
    53       this.MinimumLabel.Text = "Minimum:";
     53      this.MinimumLabel.Text = "Lower Bound:";
    5454      //
    5555      // maximumLabel
     
    5757      this.maximumLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    5858      this.maximumLabel.AutoSize = true;
    59       this.maximumLabel.Location = new System.Drawing.Point(4, 81);
     59      this.maximumLabel.Location = new System.Drawing.Point(3, 81);
    6060      this.maximumLabel.Name = "maximumLabel";
    61       this.maximumLabel.Size = new System.Drawing.Size(54, 13);
     61      this.maximumLabel.Size = new System.Drawing.Size(73, 13);
    6262      this.maximumLabel.TabIndex = 5;
    63       this.maximumLabel.Text = "Maximum:";
     63      this.maximumLabel.Text = "Upper Bound:";
    6464      //
    6565      // maximizationCheckBox
     
    6767      this.maximizationCheckBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    6868      this.maximizationCheckBox.AutoSize = true;
    69       this.maximizationCheckBox.Location = new System.Drawing.Point(69, 3);
     69      this.maximizationCheckBox.Location = new System.Drawing.Point(83, 3);
    7070      this.maximizationCheckBox.Name = "maximizationCheckBox";
    7171      this.maximizationCheckBox.Size = new System.Drawing.Size(86, 17);
     
    7777      //
    7878      this.dimensionTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    79       this.dimensionTextBox.Location = new System.Drawing.Point(69, 26);
     79      this.dimensionTextBox.Location = new System.Drawing.Point(82, 26);
    8080      this.dimensionTextBox.Name = "dimensionTextBox";
    8181      this.dimensionTextBox.Size = new System.Drawing.Size(100, 20);
    8282      this.dimensionTextBox.TabIndex = 2;
    8383      //
    84       // minimumTextBox
     84      // lowerBoundTextBox
    8585      //
    86       this.minimumTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    87       this.minimumTextBox.Location = new System.Drawing.Point(69, 52);
    88       this.minimumTextBox.Name = "minimumTextBox";
    89       this.minimumTextBox.Size = new System.Drawing.Size(100, 20);
    90       this.minimumTextBox.TabIndex = 4;
     86      this.lowerBoundTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
     87      this.lowerBoundTextBox.Location = new System.Drawing.Point(82, 52);
     88      this.lowerBoundTextBox.Name = "lowerBoundTextBox";
     89      this.lowerBoundTextBox.Size = new System.Drawing.Size(100, 20);
     90      this.lowerBoundTextBox.TabIndex = 4;
    9191      //
    92       // maximumTextBox
     92      // upperBoundTextBox
    9393      //
    94       this.maximumTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
    95       this.maximumTextBox.Location = new System.Drawing.Point(69, 78);
    96       this.maximumTextBox.Name = "maximumTextBox";
    97       this.maximumTextBox.Size = new System.Drawing.Size(100, 20);
    98       this.maximumTextBox.TabIndex = 6;
     94      this.upperBoundTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
     95      this.upperBoundTextBox.Location = new System.Drawing.Point(82, 78);
     96      this.upperBoundTextBox.Name = "upperBoundTextBox";
     97      this.upperBoundTextBox.Size = new System.Drawing.Size(100, 20);
     98      this.upperBoundTextBox.TabIndex = 6;
    9999      //
    100100      // TestFunctionInjectorView
     
    102102      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    103103      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    104       this.Controls.Add(this.maximumTextBox);
    105       this.Controls.Add(this.minimumTextBox);
     104      this.Controls.Add(this.upperBoundTextBox);
     105      this.Controls.Add(this.lowerBoundTextBox);
    106106      this.Controls.Add(this.dimensionTextBox);
    107107      this.Controls.Add(this.maximizationCheckBox);
     
    110110      this.Controls.Add(this.DimensionLabel);
    111111      this.Name = "TestFunctionInjectorView";
    112       this.Size = new System.Drawing.Size(173, 101);
     112      this.Size = new System.Drawing.Size(186, 101);
    113113      this.ResumeLayout(false);
    114114      this.PerformLayout();
     
    123123    private System.Windows.Forms.CheckBox maximizationCheckBox;
    124124    private System.Windows.Forms.TextBox dimensionTextBox;
    125     private System.Windows.Forms.TextBox minimumTextBox;
    126     private System.Windows.Forms.TextBox maximumTextBox;
     125    private System.Windows.Forms.TextBox lowerBoundTextBox;
     126    private System.Windows.Forms.TextBox upperBoundTextBox;
    127127  }
    128128}
  • trunk/sources/HeuristicLab.TestFunctions/TestFunctionInjectorView.cs

    r106 r109  
    5050      maximizationCheckBox.DataBindings.Clear();
    5151      dimensionTextBox.DataBindings.Clear();
    52       minimumTextBox.DataBindings.Clear();
    53       maximumTextBox.DataBindings.Clear();
     52      lowerBoundTextBox.DataBindings.Clear();
     53      upperBoundTextBox.DataBindings.Clear();
    5454      base.RemoveItemEvents();
    5555    }
     
    5858      base.AddItemEvents();
    5959      maximizationCheckBox.DataBindings.Add("Checked", TestFunctionInjector, "Maximization");
    60       dimensionTextBox.DataBindings.Add("Text", TestFunctionInjector, "Length");
    61       minimumTextBox.DataBindings.Add("Text", TestFunctionInjector, "Minimum");
    62       maximumTextBox.DataBindings.Add("Text", TestFunctionInjector, "Maximum");
     60      dimensionTextBox.DataBindings.Add("Text", TestFunctionInjector, "Dimension");
     61      lowerBoundTextBox.DataBindings.Add("Text", TestFunctionInjector, "LowerBound");
     62      upperBoundTextBox.DataBindings.Add("Text", TestFunctionInjector, "UpperBound");
    6363    }
    6464
     
    7070        dimensionTextBox.Enabled = false;
    7171        dimensionTextBox.Text = "-";
    72         minimumTextBox.Enabled = false;
    73         minimumTextBox.Text = "-";
    74         maximumTextBox.Enabled = false;
    75         maximumTextBox.Text = "-";
     72        lowerBoundTextBox.Enabled = false;
     73        lowerBoundTextBox.Text = "-";
     74        upperBoundTextBox.Enabled = false;
     75        upperBoundTextBox.Text = "-";
    7676      } else {
    77         /*maximizationCheckBox.Checked = TestFunctionInjector.Maximization;
    78         dimensionTextBox.Text = TestFunctionInjector.Length.ToString();
    79         minimumTextBox.Text = TestFunctionInjector.Minimum.ToString();
    80         maximumTextBox.Text = TestFunctionInjector.Maximum.ToString();*/
    8177        maximizationCheckBox.Enabled = true;
    8278        dimensionTextBox.Enabled = true;
    83         minimumTextBox.Enabled = true;
    84         maximumTextBox.Enabled = true;
     79        lowerBoundTextBox.Enabled = true;
     80        upperBoundTextBox.Enabled = true;
    8581      }
    8682    }
Note: See TracChangeset for help on using the changeset viewer.