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.RealVectorEncoding/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCreator.cs

    r9456 r10291  
    3434  [Item("RealVectorCreator", "A base class for operators creating real-valued vectors.")]
    3535  [StorableClass]
    36   public abstract class RealVectorCreator : SingleSuccessorOperator, IRealVectorCreator, IStochasticOperator {
     36  public abstract class RealVectorCreator : InstrumentedOperator, IRealVectorCreator, IStochasticOperator {
    3737    public override bool CanChangeName {
    3838      get { return false; }
     
    6363    }
    6464
    65     public sealed override IOperation Apply() {
     65    public sealed override IOperation InstrumentedApply() {
    6666      RealVectorParameter.ActualValue = Create(RandomParameter.ActualValue, LengthParameter.ActualValue, BoundsParameter.ActualValue);
    67       return base.Apply();
     67      return base.InstrumentedApply();
    6868    }
    6969
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCrossover.cs

    r9456 r10291  
    3535  [Item("RealVectorCrossover", "A base class for operators that perform a crossover of real-valued vectors.")]
    3636  [StorableClass]
    37   public abstract class RealVectorCrossover : SingleSuccessorOperator, IRealVectorCrossover, IStochasticOperator {
     37  public abstract class RealVectorCrossover : InstrumentedOperator, IRealVectorCrossover, IStochasticOperator {
    3838    public override bool CanChangeName {
    3939      get { return false; }
     
    9696    }
    9797
    98     public sealed override IOperation Apply() {
     98    public sealed override IOperation InstrumentedApply() {
    9999      RealVector result = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue);
    100100      ChildParameter.ActualValue = result;
    101101
    102       IOperation successor = base.Apply();
     102      IOperation successor = base.InstrumentedApply();
    103103      if (BoundsChecker != null) {
    104104        IOperation checkerOperation = ExecutionContext.CreateChildOperation(BoundsChecker);
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorManipulator.cs

    r9456 r10291  
    3535  [Item("RealVectorManipulator", "A base class for operators that manipulate real-valued vectors.")]
    3636  [StorableClass]
    37   public abstract class RealVectorManipulator : SingleSuccessorOperator, IRealVectorManipulator, IStochasticOperator {
     37  public abstract class RealVectorManipulator : InstrumentedOperator, IRealVectorManipulator, IStochasticOperator {
    3838    public override bool CanChangeName {
    3939      get { return false; }
     
    9090    }
    9191
    92     public sealed override IOperation Apply() {
     92    public sealed override IOperation InstrumentedApply() {
    9393      RealVector vector = RealVectorParameter.ActualValue;
    9494      Manipulate(RandomParameter.ActualValue, vector);
    9595
    96       IOperation successor = base.Apply();
     96      IOperation successor = base.InstrumentedApply();
    9797      if (BoundsChecker != null) {
    9898        IOperation checkerOperation = ExecutionContext.CreateChildOperation(BoundsChecker);
Note: See TracChangeset for help on using the changeset viewer.