Changeset 7012 for trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs
- Timestamp:
- 11/17/11 11:51:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs
r6944 r7012 27 27 using HeuristicLab.Parameters; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.PluginInfrastructure; 29 30 30 31 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 32 [NonDiscoverableType] 31 33 [StorableClass] 32 34 [Item("FullTreeCreator", "An operator that creates new symbolic expression trees using the 'Full' method")] … … 60 62 public IntValue MaximumSymbolicExpressionTreeDepth { 61 63 get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; } 64 } 65 66 public IntValue MaximumSymbolicExpressionTreeLength { 67 get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; } 62 68 } 63 69 … … 97 103 98 104 protected override ISymbolicExpressionTree Create(IRandom random) { 99 return Create(random, SymbolicExpressionTreeGrammar, MaximumSymbolicExpressionTreeDepth.Value); 105 return Create(random, SymbolicExpressionTreeGrammar, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value); 106 } 107 108 public override ISymbolicExpressionTree CreateTree(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) { 109 return Create(random, grammar, maxTreeLength, maxTreeDepth); 100 110 } 101 111 … … 108 118 /// <param name="grammar">Available tree grammar</param> 109 119 /// <param name="maxTreeDepth">Maximum tree depth</param> 120 /// <param name="maxTreeLength">Maximum tree length. This parameter is not used.</param> 110 121 /// <returns></returns> 111 public static ISymbolicExpressionTree Create(IRandom random, ISymbolicExpressionGrammar grammar, int maxTree Depth) {122 public static ISymbolicExpressionTree Create(IRandom random, ISymbolicExpressionGrammar grammar, int maxTreeLength, int maxTreeDepth) { 112 123 var tree = new SymbolicExpressionTree(); 113 124 var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
Note: See TracChangeset
for help on using the changeset viewer.