Changeset 14456 for branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Util/FitnessComparer.cs
- Timestamp:
- 12/06/16 15:07:45 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Util/FitnessComparer.cs
r14450 r14456 23 23 public static class FitnessComparer { 24 24 public static bool IsBetter(bool maximization, double a, double b) { 25 return maximization && a > b 26 || !maximization && a < b; 25 return double.IsNaN(b) && !double.IsNaN(a) 26 || maximization && a > b 27 || !maximization && a < b; 27 28 } 28 29 }
Note: See TracChangeset
for help on using the changeset viewer.