Changeset 5685 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisMultiObjectiveProblem.cs
- Timestamp:
- 03/15/11 12:35:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisMultiObjectiveProblem.cs
r5618 r5685 58 58 [StorableConstructor] 59 59 protected SymbolicDataAnalysisMultiObjectiveProblem(bool deserializing) : base(deserializing) { } 60 protected SymbolicDataAnalysisMultiObjectiveProblem(SymbolicDataAnalysisMultiObjectiveProblem<T, U, V> original, Cloner cloner) : base(original, cloner) { } 60 protected SymbolicDataAnalysisMultiObjectiveProblem(SymbolicDataAnalysisMultiObjectiveProblem<T, U, V> original, Cloner cloner) 61 : base(original, cloner) { 62 RegisterEventHandler(); 63 } 61 64 62 65 public SymbolicDataAnalysisMultiObjectiveProblem(T problemData, U evaluator, V solutionCreator) 63 66 : base(problemData, evaluator, solutionCreator) { 64 67 Parameters.Add(new ValueParameter<BoolArray>(MaximizationParameterName, "Set to false if the problem should be minimized.")); 68 69 ParameterizeOperators(); 70 RegisterEventHandler(); 71 } 72 73 [StorableHook(HookType.AfterDeserialization)] 74 private void AfterDeserialization() { 75 RegisterEventHandler(); 76 } 77 78 private void RegisterEventHandler() { 79 Evaluator.QualitiesParameter.ActualNameChanged += new System.EventHandler(QualitiesParameter_ActualNameChanged); 65 80 } 66 81 67 82 protected override void OnEvaluatorChanged() { 68 83 base.OnEvaluatorChanged(); 84 Evaluator.QualitiesParameter.ActualNameChanged += new System.EventHandler(QualitiesParameter_ActualNameChanged); 69 85 Maximization = new BoolArray(Evaluator.Maximization.ToArray()); 86 ParameterizeOperators(); 87 } 88 89 private void QualitiesParameter_ActualNameChanged(object sender, System.EventArgs e) { 90 ParameterizeOperators(); 91 } 92 93 protected override void ParameterizeOperators() { 94 base.ParameterizeOperators(); 95 foreach (var op in Operators.OfType<ISymbolicDataAnalysisMultiObjectiveAnalyzer>()) { 96 op.QualitiesParameter.ActualName = Evaluator.QualitiesParameter.ActualName; 97 op.MaximizationParameter.ActualName = MaximizationParameterName; 98 } 70 99 } 71 100 }
Note: See TracChangeset
for help on using the changeset viewer.