- Timestamp:
- 08/05/08 15:40:29 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.StructureIdentification/TreeGardener.cs
r448 r449 100 100 101 101 internal IFunctionTree PTC2(IRandom random, int size, int maxDepth) { 102 return PTC2(random, GetRandomRoot(size, maxDepth), size, maxDepth); 103 } 104 105 internal IFunctionTree PTC2(IRandom random, IFunction rootF, int size, int maxDepth) { 102 106 if(size <= 1 || maxDepth <= 1) return RandomSelect(terminals).GetTreeNode(); 103 107 List<object[]> list = new List<object[]>(); 104 IFunctionTree root = GetRandomRoot(size, maxDepth).GetTreeNode();108 IFunctionTree root = rootF.GetTreeNode(); 105 109 106 110 int currentSize = 1; … … 212 216 IFunctionTree root; 213 217 if(balanceTrees) { 214 root = MakeBalancedTree(selectedFunction, maxTreeHeight - 1);218 root = PTC2(random, selectedFunction, maxTreeSize -1, maxTreeHeight - 1); 215 219 } else { 216 root = MakeUnbalancedTree(selectedFunction, maxTreeHeight - 1);220 root = PTC2(random, selectedFunction, maxTreeSize - 1, maxTreeHeight - 1); 217 221 } 218 222 return root;
Note: See TracChangeset
for help on using the changeset viewer.