Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/25/14 14:00:47 (11 years ago)
Author:
mkommend
Message:

#2119: Merged r10149, r10231, r10261, r10291, r10292, r10295 and r10298 into stable.

Location:
stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Optimization.Operators/3.3/ParentCopyCrossover.cs

    r9456 r10507  
    2929  [Item("ParentCopyCrossover", "This operator creates an offspring by creating a clone of a randomly chosen parent. It can be used in situations where no crossover should occur after selection.")]
    3030  [StorableClass]
    31   public class ParentCopyCrossover : SingleSuccessorOperator, ICrossover, IStochasticOperator {
     31  public class ParentCopyCrossover : InstrumentedOperator, ICrossover, IStochasticOperator {
    3232    public ILookupParameter<IRandom> RandomParameter {
    3333      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     
    4343    }
    4444
    45     public override IOperation Apply() {
     45    public override IOperation InstrumentedApply() {
    4646      IScope scope = ExecutionContext.Scope;
    4747      int index = RandomParameter.ActualValue.Next(scope.SubScopes.Count);
     
    5151        scope.Variables.Add((IVariable)var.Clone());
    5252
    53       return base.Apply();
     53      return base.InstrumentedApply();
    5454    }
    5555
  • stable/HeuristicLab.Optimization.Operators/3.3/ShakingOperator.cs

    r9456 r10507  
    5656    }
    5757
    58     public override IOperation Apply() {
     58    public override IOperation InstrumentedApply() {
    5959      if (NeighborhoodCountParameter.ActualValue == null)
    6060        NeighborhoodCountParameter.ActualValue = new IntValue(Operators.CheckedItems.Count());
     
    6464      var shaker = base.Operators.CheckedItems.SingleOrDefault(x => x.Index == index);
    6565
    66       OperationCollection next = new OperationCollection(base.Apply());
     66      OperationCollection next = new OperationCollection(base.InstrumentedApply());
    6767      if (shaker.Value != null)
    6868        next.Insert(0, ExecutionContext.CreateChildOperation(shaker.Value));
  • stable/HeuristicLab.Optimization.Operators/3.3/UserDefinedOperator.cs

    r9456 r10507  
    3535    public UserDefinedOperator() : base() { }
    3636
    37     public override IOperation Apply() {
     37    public override IOperation InstrumentedApply() {
    3838      OperationCollection result = new OperationCollection();
    3939      foreach (IOperator op in Operators.CheckedItems.OrderBy(x => x.Index).Select(x => x.Value)) {
    4040        result.Add(ExecutionContext.CreateOperation(op));
    4141      }
    42       result.Add(base.Apply());
     42      result.Add(base.InstrumentedApply());
    4343      return result;
    4444    }
Note: See TracChangeset for help on using the changeset viewer.