Changeset 4722 for trunk/sources/HeuristicLab.Algorithms.LocalSearch
- 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.Algorithms.LocalSearch/3.3/LocalSearch.cs
r4437 r4722 125 125 [StorableConstructor] 126 126 private LocalSearch(bool deserializing) : base(deserializing) { } 127 [StorableHook(HookType.AfterDeserialization)] 128 private void AfterDeserialization() { 129 Initialize(); 130 } 131 private LocalSearch(LocalSearch original, Cloner cloner) 132 : base(original, cloner) { 133 moveQualityAnalyzer = cloner.Clone(original.moveQualityAnalyzer); 134 Initialize(); 135 } 136 public override IDeepCloneable Clone(Cloner cloner) { 137 return new LocalSearch(this, cloner); 138 } 127 139 public LocalSearch() 128 140 : base() { … … 166 178 } 167 179 168 public override IDeepCloneable Clone(Cloner cloner) {169 LocalSearch clone = (LocalSearch)base.Clone(cloner);170 clone.moveQualityAnalyzer = (BestAverageWorstQualityAnalyzer)cloner.Clone(moveQualityAnalyzer);171 clone.Initialize();172 return clone;173 }174 175 180 public override void Prepare() { 176 181 if (Problem != null && MoveGenerator != null && MoveMaker != null && MoveEvaluator != null) … … 256 261 257 262 #region Helpers 258 [StorableHook(HookType.AfterDeserialization)]259 263 private void Initialize() { 260 264 if (Problem != null) { -
trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearchMainLoop.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 79 80 80 81 [StorableConstructor] 81 private LocalSearchMainLoop(bool deserializing) : base( ) { }82 private LocalSearchMainLoop(bool deserializing) : base(deserializing) { } 82 83 public LocalSearchMainLoop() 83 84 : base() { 84 85 Initialize(); 86 } 87 private LocalSearchMainLoop(LocalSearchMainLoop original, Cloner cloner) 88 : base(original, cloner) { 89 } 90 public override IDeepCloneable Clone(Cloner cloner) { 91 return new LocalSearchMainLoop(this, cloner); 85 92 } 86 93
Note: See TracChangeset
for help on using the changeset viewer.