- Timestamp:
- 06/13/12 09:01:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection/3.3/GeneralizedRankSelector.cs
r7259 r7995 63 63 double pressure = PressureParameter.ActualValue.Value; 64 64 65 var ordered = qualities. Select((x, index) => new KeyValuePair<int, double>(index, x.Value)).OrderBy(x => x.Value).ToList();65 var ordered = qualities.Where(x => IsValidQuality(x.Value)).Select((x, index) => new KeyValuePair<int, double>(index, x.Value)).OrderBy(x => x.Value).ToList(); 66 66 if (maximization) ordered.Reverse(); 67 68 //check if list with indexes is as long as the original scope list 69 //otherwise invalid quality values were filtered 70 if (ordered.Count != scopes.Count) { 71 throw new ArgumentException("The scopes contain invalid quality values (either infinity or double.NaN) on which the selector cannot operate."); 72 } 67 73 68 74 int m = scopes.Count;
Note: See TracChangeset
for help on using the changeset viewer.