Changeset 3115
- Timestamp:
- 03/19/10 14:17:22 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.OneMax/3.3
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.OneMax/3.3/HeuristicLab.Problems.OneMax-3.3.csproj
r3082 r3115 86 86 </ItemGroup> 87 87 <ItemGroup> 88 <Compile Include="Interfaces\IOneMaxSolutionsVisualizer.cs" /> 88 89 <Compile Include="Properties\AssemblyInfo.cs" /> 89 90 <Compile Include="Evaluators\OneMaxEvaluator.cs" /> -
trunk/sources/HeuristicLab.Problems.OneMax/3.3/Onemax.cs
r3108 r3115 64 64 get { return EvaluatorParameter; } 65 65 } 66 public OptionalValueParameter<IOneMaxSolutionsVisualizer> VisualizerParameter { 67 get { return (OptionalValueParameter<IOneMaxSolutionsVisualizer>)Parameters["Visualizer"]; } 68 } 66 69 IParameter IProblem.VisualizerParameter { 67 get { throw new NotImplementedException(); }70 get { return VisualizerParameter; } 68 71 } 69 72 public ValueParameter<DoubleValue> BestKnownQualityParameter { … … 97 100 get { return EvaluatorParameter.Value; } 98 101 } 102 public IOneMaxSolutionsVisualizer Visualizer { 103 get { return VisualizerParameter.Value; } 104 set { VisualizerParameter.Value = value; } 105 } 99 106 ISolutionsVisualizer IProblem.Visualizer { 100 get { throw new NotImplementedException(); }107 get { return VisualizerParameter.Value; } 101 108 } 102 109 public DoubleValue BestKnownQuality { … … 119 126 Parameters.Add(new ValueParameter<IOneMaxEvaluator>("Evaluator", "The operator which should be used to evaluate OneMax solutions.", evaluator)); 120 127 Parameters.Add(new ValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this OneMax instance.", new DoubleValue(5))); 128 Parameters.Add(new ValueParameter<IOneMaxSolutionsVisualizer>("Visualizer", "The operator which should be used to visualize OneMax solutions.", null)); 121 129 122 130 creator.BinaryVectorParameter.ActualName = "OneMaxSolution"; … … 178 186 ParameterizeSolutionCreator(); 179 187 LengthParameter.Value.ValueChanged += new EventHandler(Length_ValueChanged); 188 BestKnownQualityParameter.Value.Value = Length.Value; 180 189 } 181 190 void Length_ValueChanged(object sender, EventArgs e) { … … 184 193 void BestKnownQualityParameter_ValueChanged(object sender, EventArgs e) { 185 194 BestKnownQualityParameter.Value.Value = Length.Value; 195 } 196 void VisualizerParameter_ValueChanged(object sender, EventArgs e) { 197 OnVisualizerChanged(); 186 198 } 187 199 #endregion … … 195 207 EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged); 196 208 LengthParameter.ValueChanged += new EventHandler(LengthParameter_ValueChanged); 209 LengthParameter.Value.ValueChanged += new EventHandler(Length_ValueChanged); 197 210 BestKnownQualityParameter.Value.Value = Length.Value; 198 211 BestKnownQualityParameter.ValueChanged += new EventHandler(BestKnownQualityParameter_ValueChanged); 212 VisualizerParameter.ValueChanged += new EventHandler(VisualizerParameter_ValueChanged); 199 213 } 200 214 private void ParameterizeSolutionCreator() {
Note: See TracChangeset
for help on using the changeset viewer.