Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/28/10 01:44:33 (14 years ago)
Author:
swagner
Message:

Revoked changes of r5177 (#1333)

Location:
branches/ParallelEngine/HeuristicLab.Selection/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/ParallelEngine/HeuristicLab.Selection/3.3/GenderSpecificSelector.cs

    r5177 r5178  
    140140    /// <exception cref="InvalidOperationException">Thrown when <see cref="NumberOfSelectedSubScopesParameter"/> returns an odd number.</exception>
    141141    /// <returns>Returns Apply of <see cref="AlgorithmOperator"/>.</returns>
    142     public override IOperation Apply(IExecutionContext context) {
     142    public override IOperation Apply() {
    143143      int count = NumberOfSelectedSubScopesParameter.ActualValue.Value;
    144144      if (count % 2 > 0) throw new InvalidOperationException(Name + ": There must be an equal number of sub-scopes to be selected.");
    145145      FemaleSelector.NumberOfSelectedSubScopesParameter.Value = new IntValue(count / 2);
    146146      MaleSelector.NumberOfSelectedSubScopesParameter.Value = new IntValue(count / 2);
    147       return base.Apply(context);
     147      return base.Apply();
    148148    }
    149149
  • branches/ParallelEngine/HeuristicLab.Selection/3.3/OffspringSelector.cs

    r5177 r5178  
    8080    }
    8181
    82     public override IOperation Apply(IExecutionContext context) {
     82    public override IOperation Apply() {
    8383      double maxSelPress = MaximumSelectionPressureParameter.ActualValue.Value;
    8484      double successRatio = SuccessRatioParameter.ActualValue.Value;
    85       IScope scope = context.Scope;
     85      IScope scope = ExecutionContext.Scope;
    8686      IScope parents = scope.SubScopes[0];
    8787      IScope offspring = scope.SubScopes[1];
     
    162162        IOperator moreOffspring = OffspringCreatorParameter.ActualValue as IOperator;
    163163        if (moreOffspring == null) throw new InvalidOperationException(Name + ": More offspring are required, but no operator specified for creating them.");
    164         return context.CreateOperation(moreOffspring);
     164        return ExecutionContext.CreateOperation(moreOffspring);
    165165      } else {
    166166        // enough children generated
     
    170170        scope.Variables.Remove(OffspringPopulationParameter.TranslatedName);
    171171        scope.Variables.Remove(OffspringPopulationWinnersParameter.TranslatedName);
    172         return base.Apply(context);
     172        return base.Apply();
    173173      }
    174174    }
  • branches/ParallelEngine/HeuristicLab.Selection/3.3/Reducer.cs

    r5177 r5178  
    5252    }
    5353
    54     public sealed override IOperation Apply(IExecutionContext context) {
     54    public sealed override IOperation Apply() {
    5555      List<IScope> scopes = new List<IScope>(CurrentScope.SubScopes);
    5656      List<IScope> reduced = Reduce(scopes);
     
    5959      CurrentScope.SubScopes.AddRange(reduced);
    6060
    61       return base.Apply(context);
     61      return base.Apply();
    6262    }
    6363
  • branches/ParallelEngine/HeuristicLab.Selection/3.3/Replacer.cs

    r5177 r5178  
    7575    }
    7676
    77     public override IOperation Apply(IExecutionContext context) {
    78       if (context.Scope.SubScopes.Count != 2) throw new InvalidOperationException(Name + ": There must be two sub-scopes which should be replaced/merged.");
    79       int remaining = context.Scope.SubScopes[0].SubScopes.Count;
    80       int selected = context.Scope.SubScopes[1].SubScopes.Count;
     77    public override IOperation Apply() {
     78      if (ExecutionContext.Scope.SubScopes.Count != 2) throw new InvalidOperationException(Name + ": There must be two sub-scopes which should be replaced/merged.");
     79      int remaining = ExecutionContext.Scope.SubScopes[0].SubScopes.Count;
     80      int selected = ExecutionContext.Scope.SubScopes[1].SubScopes.Count;
    8181
    8282      ISelector replacedSelector = ReplacedSelectorParameter.ActualValue;
     
    9292      }
    9393
    94       return base.Apply(context);
     94      return base.Apply();
    9595    }
    9696  }
  • branches/ParallelEngine/HeuristicLab.Selection/3.3/Selector.cs

    r5177 r5178  
    5454    }
    5555
    56     public sealed override IOperation Apply(IExecutionContext context) {
     56    public sealed override IOperation Apply() {
    5757      List<IScope> scopes = new List<IScope>(CurrentScope.SubScopes);
    5858      IScope[] selected = Select(scopes);
     
    6666      CurrentScope.SubScopes.Add(selectedScope);
    6767
    68       return base.Apply(context);
     68      return base.Apply();
    6969    }
    7070
Note: See TracChangeset for help on using the changeset viewer.