- Timestamp:
- 10/04/19 17:31:54 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/IMultiObjectiveProblem.cs
r17317 r17320 33 33 where TEncoding : class, IEncoding<TEncodedSolution> 34 34 where TEncodedSolution : class, IEncodedSolution { } 35 36 //TODO derive IMutliObjectiveProblem from IMultiObjectiveProblemDefinition? 35 37 } -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/IMultiObjectiveProblemDefinition.cs
r17315 r17320 21 21 22 22 using System.Collections.Generic; 23 using System.Threading; 23 24 using HEAL.Attic; 24 25 using HeuristicLab.Core; … … 38 39 where TEncodedSolution : class, IEncodedSolution { 39 40 double[] Evaluate(TEncodedSolution solution, IRandom random); 41 double[] Evaluate(TEncodedSolution solution, IRandom random, CancellationToken cancellationToken); 40 42 void Analyze(TEncodedSolution[] solutions, double[][] qualities, ResultCollection results, IRandom random); 41 43 } -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/ISingleObjectiveProblem.cs
r17317 r17320 33 33 where TEncoding : class, IEncoding<TEncodedSolution> 34 34 where TEncodedSolution : class, IEncodedSolution { } 35 //TODO derive ISingleObjectiveProblem from ISingleObjectiveProblemDefinition? 35 36 } -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/ISingleObjectiveProblemDefinition.cs
r17257 r17320 21 21 22 22 using System.Collections.Generic; 23 using System.Threading; 23 24 using HEAL.Attic; 24 25 using HeuristicLab.Core; … … 35 36 where TEncoding : class, IEncoding<TEncodedSolution> 36 37 where TEncodedSolution : class, IEncodedSolution { 38 37 39 double Evaluate(TEncodedSolution solution, IRandom random); 40 double Evaluate(TEncodedSolution solution, IRandom random, CancellationToken cancellationToken); 41 38 42 void Analyze(TEncodedSolution[] solutions, double[] qualities, ResultCollection results, IRandom random); 39 43 IEnumerable<TEncodedSolution> GetNeighbors(TEncodedSolution solution, IRandom random); -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/MultiObjectiveProblem.cs
r17317 r17320 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using System.Threading; 25 26 using HEAL.Attic; 26 27 using HeuristicLab.Common; … … 133 134 } 134 135 135 public abstract double[] Evaluate(TEncodedSolution solution, IRandom random); 136 public virtual double[] Evaluate(TEncodedSolution solution, IRandom random) { 137 return Evaluate(solution, random, CancellationToken.None); 138 } 139 140 public abstract double[] Evaluate(TEncodedSolution solution, IRandom random, CancellationToken cancellationToken); 136 141 public virtual void Analyze(TEncodedSolution[] solutions, double[][] qualities, ResultCollection results, IRandom random) { } 137 142 -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveProblem.cs
r17317 r17320 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using System.Threading; 25 26 using HEAL.Attic; 26 27 using HeuristicLab.Common; … … 112 113 } 113 114 114 public abstract double Evaluate(TEncodedSolution solution, IRandom random); 115 public virtual double Evaluate(TEncodedSolution solution, IRandom random) { 116 return Evaluate(solution, random, CancellationToken.None); 117 } 118 public abstract double Evaluate(TEncodedSolution solution, IRandom random, CancellationToken cancellationToken); 115 119 public virtual void Analyze(TEncodedSolution[] solutions, double[] qualities, ResultCollection results, IRandom random) { } 116 120 public virtual IEnumerable<TEncodedSolution> GetNeighbors(TEncodedSolution solution, IRandom random) {
Note: See TracChangeset
for help on using the changeset viewer.