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:
1 edited
1 moved

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/Analyzers/SymbolicExpressionTreeLengthCalculator.cs

    r5494 r5499  
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    29 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers {
     29namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
    3030  /// <summary>
    31   /// An operator that outputs the tree size of a symbolic expression tree.
     31  /// An operator that outputs the length of a symbolic expression tree.
    3232  /// </summary>
    33   [Item("SymbolicExpressionTreeSizeCalculator", "An operator that outputs the tree size of a symbolic expression tree.")]
     33  [Item("SymbolicExpressionTreeLengthCalculator", "An operator that outputs the length of a symbolic expression tree.")]
    3434  [StorableClass]
    35   public sealed class SymbolicExpressionTreeSizeCalculator : SingleSuccessorOperator {
     35  public sealed class SymbolicExpressionTreeLengthCalculator : SingleSuccessorOperator {
    3636    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
    37     private const string SymbolicExpressionTreeSizeParameterName = "SymbolicExpressionTreeSize";
     37    private const string SymbolicExpressionTreeLengthParameterName = "SymbolicExpressionTreeLength";
    3838
    3939    #region parameter properties
     
    4141      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
    4242    }
    43     public ILookupParameter<DoubleValue> SymbolicExpressionTreeSizeParameter {
    44       get { return (ILookupParameter<DoubleValue>)Parameters[SymbolicExpressionTreeSizeParameterName]; }
     43    public ILookupParameter<DoubleValue> SymbolicExpressionTreeLengthParameter {
     44      get { return (ILookupParameter<DoubleValue>)Parameters[SymbolicExpressionTreeLengthParameterName]; }
    4545    }
    4646    #endregion
     
    5050      get { return SymbolicExpressionTreeParameter.ActualValue; }
    5151    }
    52     public DoubleValue SymbolicExpressionTreeSize {
    53       get { return SymbolicExpressionTreeSizeParameter.ActualValue; }
    54       set { SymbolicExpressionTreeSizeParameter.ActualValue = value; }
     52    public DoubleValue SymbolicExpressionTreeLength {
     53      get { return SymbolicExpressionTreeLengthParameter.ActualValue; }
     54      set { SymbolicExpressionTreeLengthParameter.ActualValue = value; }
    5555    }
    5656    #endregion
    5757
    5858    [StorableConstructor]
    59     private SymbolicExpressionTreeSizeCalculator(bool deserializing) : base(deserializing) { }
    60     private SymbolicExpressionTreeSizeCalculator(SymbolicExpressionTreeSizeCalculator original, Cloner cloner) : base(original, cloner) { }
    61     public SymbolicExpressionTreeSizeCalculator()
     59    private SymbolicExpressionTreeLengthCalculator(bool deserializing) : base(deserializing) { }
     60    private SymbolicExpressionTreeLengthCalculator(SymbolicExpressionTreeLengthCalculator original, Cloner cloner) : base(original, cloner) { }
     61    public SymbolicExpressionTreeLengthCalculator()
    6262      : base() {
    63       Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose size should be calculated."));
    64       Parameters.Add(new LookupParameter<DoubleValue>(SymbolicExpressionTreeSizeParameterName, "The tree size of the symbolic expression tree."));
     63      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose length should be calculated."));
     64      Parameters.Add(new LookupParameter<DoubleValue>(SymbolicExpressionTreeLengthParameterName, "The length of the symbolic expression tree."));
    6565    }
    6666
    6767    public override IOperation Apply() {
    68       SymbolicExpressionTree tree = SymbolicExpressionTree;
    69       SymbolicExpressionTreeSize = new DoubleValue(tree.Size);
     68      SymbolicExpressionTreeLength = new DoubleValue(SymbolicExpressionTree.Size);
    7069      return base.Apply();
    7170    }
    7271
    7372    public override IDeepCloneable Clone(Cloner cloner) {
    74       return new SymbolicExpressionTreeSizeCalculator(this, cloner);
     73      return new SymbolicExpressionTreeLengthCalculator(this, cloner);
    7574    }
    7675  }
Note: See TracChangeset for help on using the changeset viewer.