Changeset 4722 for trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers
- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/MinAverageMaxSymbolicExpressionTreeSizeAnalyzer.cs
r4068 r4722 65 65 66 66 #endregion 67 [StorableConstructor] 68 private MinAverageMaxSymbolicExpressionTreeSizeAnalyzer(bool deserializing) : base() { } 69 private MinAverageMaxSymbolicExpressionTreeSizeAnalyzer(MinAverageMaxSymbolicExpressionTreeSizeAnalyzer original, Cloner cloner) 70 : base(original, cloner) { 71 AfterDeserialization(); 72 } 67 73 public MinAverageMaxSymbolicExpressionTreeSizeAnalyzer() 68 74 : base() { … … 95 101 valueAnalyzer.Successor = null; 96 102 97 Initialize();103 AfterDeserialization(); 98 104 } 99 105 100 [StorableConstructor]101 private MinAverageMaxSymbolicExpressionTreeSizeAnalyzer(bool deserializing) : base() { }102 106 103 107 [StorableHook(HookType.AfterDeserialization)] 104 private void Initialize() {108 private void AfterDeserialization() { 105 109 SymbolicExpressionTreeParameter.DepthChanged += new EventHandler(SymbolicExpressionTreeParameter_DepthChanged); 106 110 SymbolicExpressionTreeSizeParameter.DepthChanged += new EventHandler(SymbolicExpressionTreeSizeParameter_DepthChanged); … … 108 112 109 113 public override IDeepCloneable Clone(Cloner cloner) { 110 MinAverageMaxSymbolicExpressionTreeSizeAnalyzer clone = (MinAverageMaxSymbolicExpressionTreeSizeAnalyzer)base.Clone(cloner); 111 clone.Initialize(); 112 return clone; 114 return new MinAverageMaxSymbolicExpressionTreeSizeAnalyzer(this, cloner); 113 115 } 114 116 -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeCalculator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 55 56 #endregion 56 57 58 [StorableConstructor] 59 private SymbolicExpressionTreeSizeCalculator(bool deserializing) : base(deserializing) { } 60 private SymbolicExpressionTreeSizeCalculator(SymbolicExpressionTreeSizeCalculator original, Cloner cloner) : base(original, cloner) { } 57 61 public SymbolicExpressionTreeSizeCalculator() 58 62 : base() { … … 66 70 return base.Apply(); 67 71 } 72 73 public override IDeepCloneable Clone(Cloner cloner) { 74 return new SymbolicExpressionTreeSizeCalculator(this, cloner); 75 } 68 76 } 69 77 }
Note: See TracChangeset
for help on using the changeset viewer.