Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/17/11 11:51:09 (12 years ago)
Author:
bburlacu
Message:

#1654: Updated Full-, Grow- and RampedHalfAndHalf tree creators so that the Create call has the exact same signature for all of them (including the probabilistic tree creator); adjusted tests. Added CreateTree interface method and tree creator selection mechanism in the Sample Tree View.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs

    r6911 r7012  
    2828using HeuristicLab.Parameters;
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HeuristicLab.PluginInfrastructure;
    3031
    3132namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
     33  [NonDiscoverableType]
    3234  [StorableClass]
    3335  [Item("ProbabilisticTreeCreator", "An operator that creates new symbolic expression trees with uniformly distributed length")]
     
    101103    }
    102104
    103     public static ISymbolicExpressionTree Create(IRandom random, ISymbolicExpressionGrammar grammar,
    104       int maxTreeLength, int maxTreeDepth) {
     105    public override ISymbolicExpressionTree CreateTree(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
     106      return Create(random, grammar, maxTreeLength, maxTreeDepth);
     107    }
     108
     109    public static ISymbolicExpressionTree Create(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) {
    105110      SymbolicExpressionTree tree = new SymbolicExpressionTree();
    106111      var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
Note: See TracChangeset for help on using the changeset viewer.