Changeset 2817 for trunk/sources/HeuristicLab.Selection/3.3/LeftSelector.cs
- Timestamp:
- 02/17/10 00:30:46 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection/3.3/LeftSelector.cs
r2805 r2817 36 36 public LeftSelector() : base() { } 37 37 38 protected override void Select(ScopeList source, ScopeList target) {38 protected override ScopeList Select(ScopeList scopes) { 39 39 int count = NumberOfSelectedSubScopesParameter.ActualValue.Value; 40 40 bool copy = CopySelectedParameter.Value.Value; 41 ScopeList selected = new ScopeList(); 41 42 42 43 int j = 0; 43 44 for (int i = 0; i < count; i++) { 44 45 if (copy) { 45 target.Add((IScope)source[j].Clone());46 selected.Add((IScope)scopes[j].Clone()); 46 47 j++; 47 if (j >= s ource.Count) j = 0;48 if (j >= scopes.Count) j = 0; 48 49 } else { 49 target.Add(source[0]);50 s ource.RemoveAt(0);50 selected.Add(scopes[0]); 51 scopes.RemoveAt(0); 51 52 } 52 53 } 54 return selected; 53 55 } 54 56 }
Note: See TracChangeset
for help on using the changeset viewer.