Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/07/14 11:14:18 (11 years ago)
Author:
mkommend
Message:

#2119: Added interface for instrumented operators and adapted problem and encoding specific operators to provide instrumentation capabilities.

Location:
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs

    r9456 r10291  
    3434  [Item("RandomPermutationCreator", "An operator which creates a new random permutation of integer values.")]
    3535  [StorableClass]
    36   public sealed class RandomPermutationCreator : SingleSuccessorOperator, IPermutationCreator, IStochasticOperator {
     36  public sealed class RandomPermutationCreator : InstrumentedOperator, IPermutationCreator, IStochasticOperator {
    3737    public override bool CanChangeName {
    3838      get { return false; }
     
    7272    }
    7373
    74     public override IOperation Apply() {
     74    public override IOperation InstrumentedApply() {
    7575      PermutationParameter.ActualValue = new Permutation(PermutationType, LengthParameter.ActualValue.Value, RandomParameter.ActualValue);
    76       return base.Apply();
     76      return base.InstrumentedApply();
    7777    }
    7878  }
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationCrossover.cs

    r9456 r10291  
    3333  [Item("PermutationCrossover", "A base class for permutation crossover operators.")]
    3434  [StorableClass]
    35   public abstract class PermutationCrossover : SingleSuccessorOperator, IPermutationCrossover, IStochasticOperator {
     35  public abstract class PermutationCrossover : InstrumentedOperator, IPermutationCrossover, IStochasticOperator {
    3636    public override bool CanChangeName {
    3737      get { return false; }
     
    6060    }
    6161
    62     public sealed override IOperation Apply() {
     62    public sealed override IOperation InstrumentedApply() {
    6363      ChildParameter.ActualValue = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue);
    64       return base.Apply();
     64      return base.InstrumentedApply();
    6565    }
    6666
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationManipulator.cs

    r9456 r10291  
    3333  [Item("PermutationManipulator", "A base class for permutation manipulation operators.")]
    3434  [StorableClass]
    35   public abstract class PermutationManipulator : SingleSuccessorOperator, IPermutationManipulator, IStochasticOperator {
     35  public abstract class PermutationManipulator : InstrumentedOperator, IPermutationManipulator, IStochasticOperator {
    3636    public override bool CanChangeName {
    3737      get { return false; }
     
    5454    }
    5555
    56     public sealed override IOperation Apply() {
     56    public sealed override IOperation InstrumentedApply() {
    5757      Manipulate(RandomParameter.ActualValue, PermutationParameter.ActualValue);
    58       return base.Apply();
     58      return base.InstrumentedApply();
    5959    }
    6060
Note: See TracChangeset for help on using the changeset viewer.