Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/24/10 15:26:27 (14 years ago)
Author:
gkronber
Message:

Removed code fragments from class Scope which updated the SubScopes list when setting the parent property of a scope. ##1207

Location:
trunk/sources/HeuristicLab.Selection/3.3
Files:
2 edited

Legend:

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

    r4068 r4489  
    148148        scope.SubScopes.Remove(parents);
    149149        scope.SubScopes.Remove(offspring);
    150         while (parents.SubScopes.Count > 0)
    151           scope.SubScopes.Add(parents.SubScopes[0]);
     150        while (parents.SubScopes.Count > 0) {
     151          IScope parent = parents.SubScopes[0];
     152          parents.SubScopes.RemoveAt(0);
     153          scope.SubScopes.Add(parent);
     154        }
    152155
    153156        IOperator moreOffspring = OffspringCreatorParameter.ActualValue as IOperator;
  • trunk/sources/HeuristicLab.Selection/3.3/RightChildReducer.cs

    r4477 r4489  
    5555
    5656        // merge right children
    57         while (leftRightChild.SubScopes.Count > 0)
    58           rightChild.SubScopes.Add(leftRightChild.SubScopes[0]);
     57        while (leftRightChild.SubScopes.Count > 0) {
     58          IScope leftRightChildChild = leftRightChild.SubScopes[0];
     59          leftRightChild.SubScopes.RemoveAt(0);
     60          rightChild.SubScopes.Add(leftRightChildChild);
     61        }
    5962
    6063        leftChild = leftChild.SubScopes[0];
Note: See TracChangeset for help on using the changeset viewer.