Changeset 5549 for branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDeleter.cs
- Timestamp:
- 02/22/11 19:04:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDeleter.cs
r5529 r5549 95 95 var selectedSymbol = allowedSymbolsList.SelectRandom(weights, random); 96 96 97 int minPossible Size= invocationCutPoint.Parent.Grammar.GetMinExpressionLength(selectedSymbol);98 int max Size = Math.Max(minPossibleSize, invocationCutPoint.ReplacedChild.GetSize());99 int minPossible Height= invocationCutPoint.Parent.Grammar.GetMinExpressionDepth(selectedSymbol);100 int max Height = Math.Max(minPossibleHeight, invocationCutPoint.ReplacedChild.GetHeight());97 int minPossibleLength = invocationCutPoint.Parent.Grammar.GetMinExpressionLength(selectedSymbol); 98 int maxLength = Math.Max(minPossibleLength, invocationCutPoint.ReplacedChild.GetLength()); 99 int minPossibleDepth = invocationCutPoint.Parent.Grammar.GetMinExpressionDepth(selectedSymbol); 100 int maxDepth = Math.Max(minPossibleDepth, invocationCutPoint.ReplacedChild.GetDepth()); 101 101 replacementTree = selectedSymbol.CreateTreeNode(); 102 102 if (replacementTree.HasLocalParameters) … … 105 105 invocationCutPoint.Parent.InsertSubTree(invocationCutPoint.ReplacedChildIndex, replacementTree); 106 106 107 ProbabilisticTreeCreator.PTC2(random, replacementTree, max Size, maxHeight, 0, 0);107 ProbabilisticTreeCreator.PTC2(random, replacementTree, maxLength, maxDepth, 0, 0); 108 108 109 109 invocationCutPoint = (from node in symbolicExpressionTree.IterateNodesPrefix()
Note: See TracChangeset
for help on using the changeset viewer.