Changeset 14221
- Timestamp:
- 07/29/16 11:10:58 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs
r14198 r14221 111 111 } else { 112 112 var selectedBranch = SelectRandomBranch(random, allowedBranches, internalCrossoverPointProbability); 113 if (selectedBranch != null) 114 selectedBranch = (ISymbolicExpressionTreeNode)selectedBranch.Clone(); 113 115 114 116 if (crossoverPoint0.Child != null) { -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs
r14185 r14221 44 44 45 45 // parent relation is not persisted or cloned (will be set on AddSubtree or RemoveSubtree) 46 [Storable] 46 47 private ISymbolicExpressionTreeNode parent; 47 48 public ISymbolicExpressionTreeNode Parent { … … 87 88 if (subtrees != null) { 88 89 foreach (var subtree in subtrees) 89 subtree.Parent = this; 90 if (subtree.Parent != null) 91 subtree.Parent = this; 90 92 } 91 93 }
Note: See TracChangeset
for help on using the changeset viewer.