- Timestamp:
- 08/31/11 11:52:11 (13 years ago)
- Location:
- branches/GeneralizedQAP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP
- Property svn:mergeinfo changed
/trunk/sources (added) merged: 6648-6649,6652-6656,6661-6674,6676-6681,6684
- Property svn:mergeinfo changed
-
branches/GeneralizedQAP/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs
r6375 r6685 55 55 : base() { 56 56 symbol = original.symbol; // symbols are reused 57 subtrees = new List<ISymbolicExpressionTreeNode>(original.subtrees.Count); 58 foreach (var subtree in original.subtrees) { 59 var clonedSubtree = cloner.Clone(subtree); 60 subtrees.Add(clonedSubtree); 61 clonedSubtree.Parent = this; 57 if (original.subtrees != null) { 58 subtrees = new List<ISymbolicExpressionTreeNode>(original.subtrees.Count); 59 foreach (var subtree in original.subtrees) { 60 var clonedSubtree = cloner.Clone(subtree); 61 subtrees.Add(clonedSubtree); 62 clonedSubtree.Parent = this; 63 } 62 64 } 63 65 } -
branches/GeneralizedQAP/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs
r6233 r6685 37 37 [StorableConstructor] 38 38 protected SymbolicExpressionTreeTerminalNode(bool deserializing) : base(deserializing) { } 39 // don't call cloning constructor of base to prevent allocation of sub-trees list in base! 40 protected SymbolicExpressionTreeTerminalNode(SymbolicExpressionTreeTerminalNode original, Cloner cloner) 41 : base() { 42 // symbols are reused 43 this.Symbol = original.Symbol; 44 } 39 protected SymbolicExpressionTreeTerminalNode(SymbolicExpressionTreeTerminalNode original, Cloner cloner) : base(original, cloner) { } 45 40 protected SymbolicExpressionTreeTerminalNode() : base() { } 46 41
Note: See TracChangeset
for help on using the changeset viewer.