- Timestamp:
- 08/18/10 14:57:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs
r4219 r4249 53 53 ) { 54 54 SymbolicExpressionTree tree = new SymbolicExpressionTree(); 55 var rootNode = grammar.StartSymbol.CreateTreeNode();55 var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode(); 56 56 if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random); 57 rootNode. Grammar = grammar;57 rootNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar)); 58 58 tree.Root = PTC2(random, rootNode, maxTreeSize, maxTreeHeight, maxFunctionDefinitions, maxFunctionArguments); 59 59 return tree; … … 186 186 // also assumes that newTree is already attached to root somewhere 187 187 if (IsTopLevelBranch(root, newTree)) { 188 newTree.Grammar = (ISymbolicExpressionGrammar)root.Grammar.Clone();188 ((SymbolicExpressionTreeTopLevelNode)newTree).SetGrammar((ISymbolicExpressionGrammar)root.Grammar.Clone()); 189 189 190 190 // allow invokes of existing ADFs with higher index
Note: See TracChangeset
for help on using the changeset viewer.