- Timestamp:
- 03/28/08 13:23:29 (17 years ago)
- Location:
- trunk/sources/HeuristicLab.TestFunctions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.TestFunctions/TestFunctionInjector.cs
r106 r109 39 39 } 40 40 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); } 44 44 } 45 45 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); } 49 49 } 50 50 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); } 54 54 } 55 55 … … 59 59 AddVariable(new Variable("Minimum", new DoubleData(-32.76))); 60 60 AddVariable(new Variable("Maximum", new DoubleData(32.76))); 61 AddVariable(new Variable(" Length", new IntData(2)));61 AddVariable(new Variable("Dimension", new IntData(2))); 62 62 } 63 63 64 64 public override IOperation Apply(IScope scope) { 65 65 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()); 69 69 return null; 70 70 } -
trunk/sources/HeuristicLab.TestFunctions/TestFunctionInjectorView.Designer.cs
r106 r109 29 29 this.maximizationCheckBox = new System.Windows.Forms.CheckBox(); 30 30 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(); 33 33 this.SuspendLayout(); 34 34 // … … 37 37 this.DimensionLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 38 38 this.DimensionLabel.AutoSize = true; 39 this.DimensionLabel.Location = new System.Drawing.Point( 4, 29);39 this.DimensionLabel.Location = new System.Drawing.Point(3, 29); 40 40 this.DimensionLabel.Name = "DimensionLabel"; 41 41 this.DimensionLabel.Size = new System.Drawing.Size(59, 13); … … 47 47 this.MinimumLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 48 48 this.MinimumLabel.AutoSize = true; 49 this.MinimumLabel.Location = new System.Drawing.Point( 4, 55);49 this.MinimumLabel.Location = new System.Drawing.Point(3, 55); 50 50 this.MinimumLabel.Name = "MinimumLabel"; 51 this.MinimumLabel.Size = new System.Drawing.Size( 51, 13);51 this.MinimumLabel.Size = new System.Drawing.Size(73, 13); 52 52 this.MinimumLabel.TabIndex = 3; 53 this.MinimumLabel.Text = " Minimum:";53 this.MinimumLabel.Text = "Lower Bound:"; 54 54 // 55 55 // maximumLabel … … 57 57 this.maximumLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 58 58 this.maximumLabel.AutoSize = true; 59 this.maximumLabel.Location = new System.Drawing.Point( 4, 81);59 this.maximumLabel.Location = new System.Drawing.Point(3, 81); 60 60 this.maximumLabel.Name = "maximumLabel"; 61 this.maximumLabel.Size = new System.Drawing.Size( 54, 13);61 this.maximumLabel.Size = new System.Drawing.Size(73, 13); 62 62 this.maximumLabel.TabIndex = 5; 63 this.maximumLabel.Text = " Maximum:";63 this.maximumLabel.Text = "Upper Bound:"; 64 64 // 65 65 // maximizationCheckBox … … 67 67 this.maximizationCheckBox.Anchor = System.Windows.Forms.AnchorStyles.None; 68 68 this.maximizationCheckBox.AutoSize = true; 69 this.maximizationCheckBox.Location = new System.Drawing.Point( 69, 3);69 this.maximizationCheckBox.Location = new System.Drawing.Point(83, 3); 70 70 this.maximizationCheckBox.Name = "maximizationCheckBox"; 71 71 this.maximizationCheckBox.Size = new System.Drawing.Size(86, 17); … … 77 77 // 78 78 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); 80 80 this.dimensionTextBox.Name = "dimensionTextBox"; 81 81 this.dimensionTextBox.Size = new System.Drawing.Size(100, 20); 82 82 this.dimensionTextBox.TabIndex = 2; 83 83 // 84 // minimumTextBox84 // lowerBoundTextBox 85 85 // 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; 91 91 // 92 // maximumTextBox92 // upperBoundTextBox 93 93 // 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; 99 99 // 100 100 // TestFunctionInjectorView … … 102 102 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 103 103 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); 106 106 this.Controls.Add(this.dimensionTextBox); 107 107 this.Controls.Add(this.maximizationCheckBox); … … 110 110 this.Controls.Add(this.DimensionLabel); 111 111 this.Name = "TestFunctionInjectorView"; 112 this.Size = new System.Drawing.Size(1 73, 101);112 this.Size = new System.Drawing.Size(186, 101); 113 113 this.ResumeLayout(false); 114 114 this.PerformLayout(); … … 123 123 private System.Windows.Forms.CheckBox maximizationCheckBox; 124 124 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; 127 127 } 128 128 } -
trunk/sources/HeuristicLab.TestFunctions/TestFunctionInjectorView.cs
r106 r109 50 50 maximizationCheckBox.DataBindings.Clear(); 51 51 dimensionTextBox.DataBindings.Clear(); 52 minimumTextBox.DataBindings.Clear();53 maximumTextBox.DataBindings.Clear();52 lowerBoundTextBox.DataBindings.Clear(); 53 upperBoundTextBox.DataBindings.Clear(); 54 54 base.RemoveItemEvents(); 55 55 } … … 58 58 base.AddItemEvents(); 59 59 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"); 63 63 } 64 64 … … 70 70 dimensionTextBox.Enabled = false; 71 71 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 = "-"; 76 76 } else { 77 /*maximizationCheckBox.Checked = TestFunctionInjector.Maximization;78 dimensionTextBox.Text = TestFunctionInjector.Length.ToString();79 minimumTextBox.Text = TestFunctionInjector.Minimum.ToString();80 maximumTextBox.Text = TestFunctionInjector.Maximum.ToString();*/81 77 maximizationCheckBox.Enabled = true; 82 78 dimensionTextBox.Enabled = true; 83 minimumTextBox.Enabled = true;84 maximumTextBox.Enabled = true;79 lowerBoundTextBox.Enabled = true; 80 upperBoundTextBox.Enabled = true; 85 81 } 86 82 }
Note: See TracChangeset
for help on using the changeset viewer.