- Timestamp:
- 02/19/10 02:15:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection/3.3/TournamentSelector.cs
r2818 r2830 44 44 } 45 45 46 protected override ScopeList Select(ScopeListscopes) {46 protected override IScope[] Select(List<IScope> scopes) { 47 47 int count = NumberOfSelectedSubScopesParameter.ActualValue.Value; 48 48 bool copy = CopySelectedParameter.Value.Value; … … 51 51 List<double> qualities = QualityParameter.ActualValue.Select(x => x.Value).ToList(); 52 52 int groupSize = GroupSizeParameter.ActualValue.Value; 53 ScopeList selected = new ScopeList();53 IScope[] selected = new IScope[count]; 54 54 55 55 for (int i = 0; i < count; i++) { … … 65 65 66 66 if (copy) 67 selected .Add((IScope)scopes[best].Clone());67 selected[i] = (IScope)scopes[best].Clone(); 68 68 else { 69 selected .Add(scopes[best]);69 selected[i] = scopes[best]; 70 70 scopes.RemoveAt(best); 71 71 qualities.RemoveAt(best);
Note: See TracChangeset
for help on using the changeset viewer.