Changeset 3108
- Timestamp:
- 03/19/10 10:45:25 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.OneMax/3.3/Onemax.cs
r3107 r3108 66 66 IParameter IProblem.VisualizerParameter { 67 67 get { throw new NotImplementedException(); } 68 } 68 } 69 69 public ValueParameter<DoubleValue> BestKnownQualityParameter { 70 70 get { return (ValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; } … … 76 76 77 77 #region Properties 78 public IntValue Length { 79 get { return LengthParameter.Value; } 80 set { LengthParameter.Value = value; } 81 } 78 82 public IBinaryVectorCreator SolutionCreator { 79 83 get { return SolutionCreatorParameter.Value; } … … 95 99 ISolutionsVisualizer IProblem.Visualizer { 96 100 get { throw new NotImplementedException(); } 97 } 101 } 98 102 public DoubleValue BestKnownQuality { 99 103 get { return BestKnownQualityParameter.Value; } … … 145 149 } 146 150 public event EventHandler VisualizerChanged; 151 private void OnVisualizerChanged() { 152 if (VisualizerChanged != null) 153 VisualizerChanged(this, EventArgs.Empty); 154 } 155 147 156 public event EventHandler OperatorsChanged; 148 157 private void OnOperatorsChanged() { … … 165 174 ParameterizeEvaluator(); 166 175 OnEvaluatorChanged(); 176 } 177 void LengthParameter_ValueChanged(object sender, EventArgs e) { 178 ParameterizeSolutionCreator(); 179 LengthParameter.Value.ValueChanged += new EventHandler(Length_ValueChanged); 180 } 181 void Length_ValueChanged(object sender, EventArgs e) { 182 BestKnownQualityParameter.Value.Value = Length.Value; 183 } 184 void BestKnownQualityParameter_ValueChanged(object sender, EventArgs e) { 185 BestKnownQualityParameter.Value.Value = Length.Value; 167 186 } 168 187 #endregion … … 175 194 SolutionCreator.BinaryVectorParameter.ActualNameChanged += new EventHandler(SolutionCreator_PermutationParameter_ActualNameChanged); 176 195 EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged); 196 LengthParameter.ValueChanged += new EventHandler(LengthParameter_ValueChanged); 197 BestKnownQualityParameter.Value.Value = Length.Value; 198 BestKnownQualityParameter.ValueChanged += new EventHandler(BestKnownQualityParameter_ValueChanged); 177 199 } 178 200 private void ParameterizeSolutionCreator() { 179 SolutionCreator.LengthParameter. Value = LengthParameter.Value;201 SolutionCreator.LengthParameter.ActualName = LengthParameter.Name; 180 202 } 181 203 private void ParameterizeEvaluator() {
Note: See TracChangeset
for help on using the changeset viewer.