Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/09/09 19:16:15 (15 years ago)
Author:
abeham
Message:

fixed a bug in the uncertain best selector (#611)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Selection.Uncertainty/v3.2/UncertainBestSelector.cs

    r1746 r1777  
    8787        int selectedScopeIndex = selectionGroupIndices[poolSize - i - 1];
    8888        IScope selectedScope = source.SubScopes[selectedScopeIndex];
    89         source.RemoveSubScope(selectedScope);
    90         target.AddSubScope(selectedScope);
     89        target.AddSubScope((IScope)selectedScope.Clone());
    9190        selectedScopes.Add(selectedScope);
    9291      }
    93 
    94       if (copySelected) { // non-standard behavior, hope that's okay
     92      if (!copySelected) {
    9593        while (selectedScopes.Count > 0) {
    96           source.AddSubScope((IScope)selectedScopes[0].Clone());
     94          source.RemoveSubScope(selectedScopes[0]);
    9795          selectedScopes.RemoveAt(0);
    9896        }
Note: See TracChangeset for help on using the changeset viewer.