Changeset 2830 for trunk/sources/HeuristicLab.Selection/3.3/LeftSelector.cs
- Timestamp:
- 02/19/10 02:15:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection/3.3/LeftSelector.cs
r2818 r2830 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 33 34 public LeftSelector() : base() { } 34 35 35 protected override ScopeList Select(ScopeListscopes) {36 protected override IScope[] Select(List<IScope> scopes) { 36 37 int count = NumberOfSelectedSubScopesParameter.ActualValue.Value; 37 38 bool copy = CopySelectedParameter.Value.Value; 38 ScopeList selected = new ScopeList();39 IScope[] selected = new IScope[count]; 39 40 40 41 int j = 0; 41 42 for (int i = 0; i < count; i++) { 42 43 if (copy) { 43 selected .Add((IScope)scopes[j].Clone());44 selected[i] = (IScope)scopes[j].Clone(); 44 45 j++; 45 46 if (j >= scopes.Count) j = 0; 46 47 } else { 47 selected .Add(scopes[0]);48 selected[i] = scopes[0]; 48 49 scopes.RemoveAt(0); 49 50 }
Note: See TracChangeset
for help on using the changeset viewer.