Changeset 17741 for branches/3040_VectorBasedGP/HeuristicLab.Common/3.3/Statistics/EnumerableStatisticExtensions.cs
- Timestamp:
- 09/10/20 09:57:02 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Common/3.3/Statistics/EnumerableStatisticExtensions.cs
r17721 r17741 230 230 if (min > max) throw new ArgumentException(string.Format("Minimum {0} is larger than maximum {1}.", min, max)); 231 231 foreach (var x in values) { 232 /*if (double.IsNaN(x)) yield return (max + min) / 2.0; 233 else */ 234 if (x < min) yield return min; 232 if (double.IsNaN(x)) yield return (max + min) / 2.0; 233 else if (x < min) yield return min; 235 234 else if (x > max) yield return max; 236 235 else yield return x;
Note: See TracChangeset
for help on using the changeset viewer.