Changeset 12922 for branches/HeuristicLab.Algorithms.IteratedSentenceConstruction/HeuristicLab.Algorithms.IteratedSymbolicExpressionConstruction/3.3/SearchTree.cs
- Timestamp:
- 08/27/15 16:55:07 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Algorithms.IteratedSentenceConstruction/HeuristicLab.Algorithms.IteratedSymbolicExpressionConstruction/3.3/SearchTree.cs
r12909 r12922 62 62 63 63 private void RemoveRecursively(Node node) { 64 if (node == null) return;65 64 // when the last child has been removed we must remove the current node from it's parent 66 if (node.children.All(ch => ch == null) && node.parent != null) {65 while (node.parent != null && node.children.All(ch => ch == null)) { 67 66 node.parent.children[Array.IndexOf(node.parent.children, node)] = null; 68 RemoveRecursively(node.parent);67 node = node.parent; 69 68 } 70 69 }
Note: See TracChangeset
for help on using the changeset viewer.