Changeset 4674 for branches/CloningRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers
- Timestamp:
- 10/29/10 18:55:22 (14 years ago)
- Location:
- branches/CloningRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/MinAverageMaxSymbolicExpressionTreeSizeAnalyzer.cs
r4068 r4674 65 65 66 66 #endregion 67 [StorableConstructor] 68 private MinAverageMaxSymbolicExpressionTreeSizeAnalyzer(bool deserializing) : base() { } 69 protected 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 -
branches/CloningRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeCalculator.cs
r4068 r4674 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.