Changeset 5618 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisMultiObjectiveProblem.cs
- Timestamp:
- 03/07/11 14:23:26 (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisMultiObjectiveProblem.cs
r5598 r5618 20 20 #endregion 21 21 22 using System.Linq; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 29 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 30 31 [StorableClass] 31 public abstract class MultiObjectiveSymbolicDataAnalysisProblem<T, U, V> : SymbolicDataAnalysisProblem<T, U, V>, IMultiObjectiveHeuristicOptimizationProblem32 public abstract class SymbolicDataAnalysisMultiObjectiveProblem<T, U, V> : SymbolicDataAnalysisProblem<T, U, V>, IMultiObjectiveHeuristicOptimizationProblem 32 33 where T : class,IDataAnalysisProblemData 33 where U : class, ISymbolicDataAnalysis Evaluator<T>, IMultiObjectiveEvaluator34 where U : class, ISymbolicDataAnalysisMultiObjectiveEvaluator<T> 34 35 where V : class, ISymbolicDataAnalysisSolutionCreator { 35 36 private const string MaximizationParameterName = "Maximization"; … … 37 38 38 39 #region parameter properties 39 public ValueParameter<BoolArray> MaximizationParameter {40 get { return ( ValueParameter<BoolArray>)Parameters[MaximizationParameterName]; }40 public IValueParameter<BoolArray> MaximizationParameter { 41 get { return (IValueParameter<BoolArray>)Parameters[MaximizationParameterName]; } 41 42 } 42 43 IParameter IMultiObjectiveHeuristicOptimizationProblem.MaximizationParameter { … … 48 49 public BoolArray Maximization { 49 50 get { return MaximizationParameter.Value; } 50 protectedset { MaximizationParameter.Value = value; }51 set { MaximizationParameter.Value = value; } 51 52 } 52 53 IMultiObjectiveEvaluator IMultiObjectiveHeuristicOptimizationProblem.Evaluator { … … 56 57 57 58 [StorableConstructor] 58 protected MultiObjectiveSymbolicDataAnalysisProblem(bool deserializing) : base(deserializing) { }59 protected MultiObjectiveSymbolicDataAnalysisProblem(MultiObjectiveSymbolicDataAnalysisProblem<T, U, V> original, Cloner cloner) : base(original, cloner) { }59 protected SymbolicDataAnalysisMultiObjectiveProblem(bool deserializing) : base(deserializing) { } 60 protected SymbolicDataAnalysisMultiObjectiveProblem(SymbolicDataAnalysisMultiObjectiveProblem<T, U, V> original, Cloner cloner) : base(original, cloner) { } 60 61 61 public MultiObjectiveSymbolicDataAnalysisProblem()62 : base( ) {62 public SymbolicDataAnalysisMultiObjectiveProblem(T problemData, U evaluator, V solutionCreator) 63 : base(problemData, evaluator, solutionCreator) { 63 64 Parameters.Add(new ValueParameter<BoolArray>(MaximizationParameterName, "Set to false if the problem should be minimized.")); 65 } 66 67 protected override void OnEvaluatorChanged() { 68 base.OnEvaluatorChanged(); 69 Maximization = new BoolArray(Evaluator.Maximization.ToArray()); 64 70 } 65 71 }
Note: See TracChangeset
for help on using the changeset viewer.