- Timestamp:
- 10/04/19 17:31:54 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs
r17270 r17320 23 23 using System.Diagnostics.Contracts; 24 24 using System.Linq; 25 using System.Threading; 25 26 using HEAL.Attic; 26 27 using HeuristicLab.Common; … … 134 135 135 136 136 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random ) {137 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random, CancellationToken cancellationToken) { 137 138 var interpreter = new Interpreter(tree, World, MaxTimeSteps); 138 139 interpreter.Run(); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/BasicSymbolicRegression/Problem.cs
r17270 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; … … 89 90 90 91 91 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random ) {92 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random, CancellationToken cancellationToken) { 92 93 // Doesn't use classes from HeuristicLab.Problems.DataAnalysis.Symbolic to make sure that the implementation can be fully understood easily. 93 94 // HeuristicLab.Problems.DataAnalysis.Symbolic would already provide all the necessary functionality (esp. interpreter) but at a much higher complexity. -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/EvenParityProblem.cs
r17270 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; … … 103 104 104 105 105 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random ) {106 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random, CancellationToken cancellationToken) { 106 107 if (NumberOfBits <= 0) throw new NotSupportedException("Number of bits must be larger than zero."); 107 108 if (NumberOfBits > 10) throw new NotSupportedException("Even parity does not support problems with number of bits > 10."); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/MultiplexerProblem.cs
r17270 r17320 24 24 using System.Diagnostics.Contracts; 25 25 using System.Linq; 26 using System.Threading; 26 27 using HEAL.Attic; 27 28 using HeuristicLab.Common; … … 117 118 118 119 119 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random ) {120 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random, CancellationToken cancellationToken) { 120 121 if (NumberOfBits <= 0) throw new NotSupportedException("Number of bits must be larger than zero."); 121 122 if (NumberOfBits > 37) throw new NotSupportedException("Multiplexer does not support problems with number of bits > 37."); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Problem.cs
r17270 r17320 22 22 using System; 23 23 using System.Linq; 24 using System.Threading; 24 25 using HEAL.Attic; 25 26 using HeuristicLab.Common; … … 92 93 } 93 94 94 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random ) {95 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random, CancellationToken cancellationToken) { 95 96 var length = LawnLengthParameter.Value.Value; 96 97 var width = LawnWidthParameter.Value.Value; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/robocode/Problem.cs
r17270 r17320 20 20 #endregion 21 21 22 using System.Threading; 22 23 using HEAL.Attic; 23 24 using HeuristicLab.Common; … … 98 99 private void AfterDeserialization() { RegisterEventHandlers(); } 99 100 100 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random ) {101 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random, CancellationToken cancellationToken) { 101 102 return Interpreter.EvaluateTankProgram(tree, RobocodePath, Enemies, null, false, NrOfRounds); 102 103 }
Note: See TracChangeset
for help on using the changeset viewer.