- Timestamp:
- 04/13/10 06:41:56 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/PathTSPTour.cs
r3306 r3317 39 39 } 40 40 41 [Storable] 41 42 private DoubleMatrix coordinates; 42 [Storable]43 43 public DoubleMatrix Coordinates { 44 44 get { return coordinates; } … … 52 52 } 53 53 } 54 [Storable] 54 55 private Permutation permutation; 55 [Storable]56 56 public Permutation Permutation { 57 57 get { return permutation; } … … 69 69 public PathTSPTour(DoubleMatrix coordinates) 70 70 : base() { 71 Coordinates = coordinates; 71 this.coordinates = coordinates; 72 Initialize(); 72 73 } 73 74 public PathTSPTour(DoubleMatrix coordinates, Permutation permutation) 74 : this(coordinates) { 75 Permutation = permutation; 75 : base() { 76 this.coordinates = coordinates; 77 this.permutation = permutation; 78 Initialize(); 79 } 80 [StorableConstructor] 81 private PathTSPTour(bool deserializing) : base(deserializing) { } 82 83 [StorableHook(HookType.AfterDeserialization)] 84 private void Initialize() { 85 if (coordinates != null) RegisterCoordinatesEvents(); 86 if (permutation != null) RegisterPermutationEvents(); 76 87 } 77 88 … … 79 90 PathTSPTour clone = new PathTSPTour(); 80 91 cloner.RegisterClonedObject(this, clone); 81 clone.Coordinates = (DoubleMatrix)cloner.Clone(coordinates); 82 clone.Permutation = (Permutation)cloner.Clone(permutation); 92 clone.ReadOnlyView = ReadOnlyView; 93 clone.coordinates = (DoubleMatrix)cloner.Clone(coordinates); 94 clone.permutation = (Permutation)cloner.Clone(permutation); 95 clone.Initialize(); 83 96 return clone; 84 97 }
Note: See TracChangeset
for help on using the changeset viewer.