- Timestamp:
- 11/24/15 16:01:02 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Algorithms.CMAEvolutionStrategy/3.4/CMAEvolutionStrategy.cs
r13173 r13361 63 63 64 64 #region Problem Properties 65 65 66 public override Type ProblemType { 66 get { return typeof(ISingleObjective HeuristicOptimizationProblem); }67 } 68 public new ISingleObjective HeuristicOptimizationProblemProblem {69 get { return (ISingleObjective HeuristicOptimizationProblem)base.Problem; }67 get { return typeof(ISingleObjectiveProblem<RealVectorEncoding, RealVector>); } 68 } 69 public new ISingleObjectiveProblem<RealVectorEncoding, RealVector> Problem { 70 get { return (ISingleObjectiveProblem<RealVectorEncoding, RealVector>)base.Problem; } 70 71 set { base.Problem = value; } 71 72 } … … 378 379 } 379 380 380 protected override void OnStarted() {381 if (!(Problem.SolutionCreator is IRealVectorCreator))382 throw new InvalidOperationException("Problems that do not use RealVectorEncoding cannot be solved by CMA-ES.");383 base.OnStarted();384 }385 386 381 #region Events 387 382 protected override void OnProblemChanged() {
Note: See TracChangeset
for help on using the changeset viewer.