Changeset 14952 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteEvaluator.cs
- Timestamp:
- 05/10/17 11:23:05 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteEvaluator.cs
r14909 r14952 37 37 38 38 [StorableConstructor] 39 public PushBenchmarkSuiteEvaluator(bool deserializing) { }39 public PushBenchmarkSuiteEvaluator(bool deserializing) : base(deserializing) { } 40 40 41 41 public PushBenchmarkSuiteEvaluator(PushBenchmarkSuiteEvaluator origin, Cloner cloner) : base(origin, cloner) { … … 172 172 173 173 private static double BooleanDiffer(bool a, bool b) { 174 return a && b ? 0 : a || b ? 1 : 2;174 return a == b ? 0 : 1; 175 175 } 176 176 … … 200 200 } 201 201 202 private static readonly string[] separator = { "\n" }; 202 203 private static double GetPrintDiffer(string estimated, IPushStack<string> printStack) { 203 var printResult = string.Join(Environment.NewLine, printStack); 204 var estimatedCount = estimated.Split(separator, StringSplitOptions.None).Length; 205 var printResult = string.Join(separator[0], printStack.Take(estimatedCount)); 204 206 205 207 return LevenshteinDistance(estimated, printResult);
Note: See TracChangeset
for help on using the changeset viewer.