Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/16/11 19:01:00 (14 years ago)
Author:
gkronber
Message:

#1418 changes in symbolic expression tree encoding.

Location:
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4

    • Property svn:ignore
      •  

        old new  
        22obj
        33HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin.cs
         4*.user
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs

    r5494 r5499  
    3333  [StorableClass]
    3434  public abstract class SymbolicExpressionTreeManipulator : SymbolicExpressionTreeOperator, ISymbolicExpressionTreeManipulator {
    35     private const string FailedManipulationEventsParameterName = "FailedManipulationEvents";
    3635    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
    3736
    3837    #region Parameter Properties
    39     public IValueParameter<IntValue> FailedManipulationEventsParameter {
    40       get { return (IValueParameter<IntValue>)Parameters[FailedManipulationEventsParameterName]; }
    41     }
    4238    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
    4339      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     
    4642
    4743    #region Properties
    48     public IntValue FailedManipulationEvents {
    49       get { return FailedManipulationEventsParameter.Value; }
    50     }
    5144    public SymbolicExpressionTree SymbolicExpressionTree {
    5245      get { return SymbolicExpressionTreeParameter.ActualValue; }
     
    5952    public SymbolicExpressionTreeManipulator()
    6053      : base() {
    61       Parameters.Add(new ValueParameter<IntValue>(FailedManipulationEventsParameterName, "The number of failed manipulation events.", new IntValue()));
    6254      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree on which the operator should be applied."));
    6355    }
     
    6557    public sealed override IOperation Apply() {
    6658      SymbolicExpressionTree tree = SymbolicExpressionTreeParameter.ActualValue;
    67       bool success;
    68       Manipulate(RandomParameter.ActualValue, tree, SymbolicExpressionGrammarParameter.ActualValue,
    69         MaxTreeSizeParameter.ActualValue, MaxTreeHeightParameter.ActualValue, out success);
     59      Manipulate(RandomParameter.ActualValue, tree);
    7060
    71       if (!success) FailedManipulationEvents.Value++;
    7261      return base.Apply();
    7362    }
    7463
    75     protected abstract void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar,
    76       IntValue maxTreeSize, IntValue maxTreeHeight, out bool success);
     64    protected abstract void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree);
    7765  }
    7866}
Note: See TracChangeset for help on using the changeset viewer.