Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/19/10 02:15:10 (14 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • worked on operators and SGA
  • improved performance
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Selection/3.3/ProportionalSelector.cs

    r2818 r2830  
    5151    }
    5252
    53     protected override ScopeList Select(ScopeList scopes) {
     53    protected override IScope[] Select(List<IScope> scopes) {
    5454      int count = NumberOfSelectedSubScopesParameter.ActualValue.Value;
    5555      bool copy = CopySelectedParameter.Value.Value;
     
    5757      bool maximization = MaximizationParameter.ActualValue.Value;
    5858      bool windowing = WindowingParameter.Value.Value;
    59       ScopeList selected = new ScopeList();
     59      IScope[] selected = new IScope[count];
    6060
    6161      // prepare qualities for proportional selection
     
    9191        }
    9292        if (copy)
    93           selected.Add((IScope)scopes[index].Clone());
     93          selected[i] = (IScope)scopes[index].Clone();
    9494        else {
    95           selected.Add(scopes[index]);
     95          selected[i] = scopes[index];
    9696          scopes.RemoveAt(index);
    9797          qualitySum -= list[index];
Note: See TracChangeset for help on using the changeset viewer.