Changeset 6237
- Timestamp:
- 05/20/11 12:50:38 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Common/3.3/Cloner.cs
r6233 r6237 57 57 mapping.Add(item, clone); 58 58 } 59 60 /// <summary> 61 /// Checks if a clone is already registered for a given deeply cloneable item. 62 /// </summary> 63 /// <param name="item">The original object.</param> 64 /// <returns>True if a clone is already registered for the given item; false otherwise</returns> 65 public bool ClonedObjectRegistered(IDeepCloneable item) { 66 return mapping.ContainsKey(item); 67 } 68 59 69 } 60 70 } -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs
r6233 r6237 37 37 public override IDeepCloneable Clone(Cloner cloner) { 38 38 foreach (ISymbol symbol in base.Symbols) 39 cloner.RegisterClonedObject(symbol, symbol); 39 if (!cloner.ClonedObjectRegistered(symbol)) 40 cloner.RegisterClonedObject(symbol, symbol); 40 41 return new SymbolicExpressionTreeGrammar(this, cloner); 41 42 }
Note: See TracChangeset
for help on using the changeset viewer.