Changeset 4722 for trunk/sources/HeuristicLab.Algorithms.TabuSearch
- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 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.TabuSearch/3.3/TabuListCreator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Operators; … … 39 40 } 40 41 42 [StorableConstructor] 43 protected TabuListCreator(bool deserializing) : base(deserializing) { } 44 protected TabuListCreator(TabuListCreator original, Cloner cloner) 45 : base(original, cloner) { 46 } 47 public override IDeepCloneable Clone(Cloner cloner) { 48 return new TabuListCreator(this, cloner); 49 } 50 41 51 public TabuListCreator() 42 52 : base() { -
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuNeighborhoodAnalyzer.cs
r4068 r4722 21 21 22 22 using System.Linq; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 26 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Parameters; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 30 29 31 namespace HeuristicLab.Algorithms.TabuSearch { 32 [StorableClass] 33 [Item("TabuNeighborhoodAnalyzer", "Analyzes the tabu neighborhood")] 30 34 public class TabuNeighborhoodAnalyzer : SingleSuccessorOperator, IAnalyzer { 31 35 public ScopeTreeLookupParameter<BoolValue> IsTabuParameter { … … 39 43 } 40 44 45 [StorableConstructor] 46 protected TabuNeighborhoodAnalyzer(bool deserializing) : base(deserializing) { } 47 protected TabuNeighborhoodAnalyzer(TabuNeighborhoodAnalyzer original, Cloner cloner) 48 : base(original, cloner) { 49 } 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new TabuNeighborhoodAnalyzer(this, cloner); 52 } 41 53 public TabuNeighborhoodAnalyzer() 42 54 : base() { -
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs
r4437 r4722 190 190 [StorableConstructor] 191 191 private TabuSearch(bool deserializing) : base(deserializing) { } 192 192 [StorableHook(HookType.AfterDeserialization)] 193 private void AfterDeserialization() { 194 Initialize(); 195 } 196 private TabuSearch(TabuSearch original, Cloner cloner) 197 : base(original, cloner) { 198 moveQualityAnalyzer = cloner.Clone(original.moveQualityAnalyzer); 199 tabuNeighborhoodAnalyzer = cloner.Clone(original.tabuNeighborhoodAnalyzer); 200 Initialize(); 201 } 193 202 public override IDeepCloneable Clone(Cloner cloner) { 194 TabuSearch clone = (TabuSearch)base.Clone(cloner); 195 clone.moveQualityAnalyzer = (BestAverageWorstQualityAnalyzer)cloner.Clone(moveQualityAnalyzer); 196 clone.tabuNeighborhoodAnalyzer = (TabuNeighborhoodAnalyzer)cloner.Clone(tabuNeighborhoodAnalyzer); 197 clone.Initialize(); 198 return clone; 203 return new TabuSearch(this, cloner); 199 204 } 200 205 … … 313 318 314 319 #region Helpers 315 [StorableHook(HookType.AfterDeserialization)]316 320 private void Initialize() { 317 321 if (Problem != null) { -
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearchMainLoop.cs
r4068 r4722 21 21 22 22 using HeuristicLab.Analysis; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 85 86 86 87 [StorableConstructor] 87 private TabuSearchMainLoop(bool deserializing) : base( ) { }88 private TabuSearchMainLoop(bool deserializing) : base(deserializing) { } 88 89 public TabuSearchMainLoop() 89 90 : base() { 90 91 Initialize(); 92 } 93 private TabuSearchMainLoop(TabuSearchMainLoop original, Cloner cloner) 94 : base(original, cloner) { 95 } 96 public override IDeepCloneable Clone(Cloner cloner) { 97 return new TabuSearchMainLoop(this, cloner); 91 98 } 92 99 -
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSelector.cs
r4068 r4722 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Data; … … 78 79 get { return CopySelectedParameter.Value; } 79 80 set { CopySelectedParameter.Value = value; } 81 } 82 83 [StorableConstructor] 84 protected TabuSelector(bool deserializing) : base(deserializing) { } 85 protected TabuSelector(TabuSelector original, Cloner cloner) 86 : base(original, cloner) { 87 } 88 public override IDeepCloneable Clone(Cloner cloner) { 89 return new TabuSelector(this, cloner); 80 90 } 81 91
Note: See TracChangeset
for help on using the changeset viewer.