- Timestamp:
- 06/03/08 17:13:38 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.StructureIdentification/TreeGardener.cs
r286 r288 126 126 if(d == maxDepth) { 127 127 parent.RemoveSubTree(a); 128 parent.InsertSubTree(a, RandomSelect( terminals).GetTreeNode());128 parent.InsertSubTree(a, RandomSelect(GetAllowedSubFunctions(parent.Function, a).Where(f => IsTerminal(f)).ToArray()).GetTreeNode()); 129 129 } else { 130 IFunction selectedFunction = RandomSelect( functions);130 IFunction selectedFunction = RandomSelect(GetAllowedSubFunctions(parent.Function, a).Where(f => !IsTerminal(f)).ToArray()); 131 131 IFunctionTree newTree = selectedFunction.GetTreeNode(); 132 132 parent.RemoveSubTree(a);
Note: See TracChangeset
for help on using the changeset viewer.