Changeset 8887 for trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/PWREncoding.cs
- Timestamp:
- 11/11/12 22:57:09 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/PWREncoding.cs
r8603 r8887 30 30 [StorableClass] 31 31 public class PWREncoding : Item, IScheduleEncoding { 32 32 33 [Storable] 33 34 public IntegerVector PermutationWithRepetition { get; set; } 34 35 35 36 36 [StorableConstructor] … … 40 40 this.PermutationWithRepetition = cloner.Clone(original.PermutationWithRepetition); 41 41 } 42 public override IDeepCloneable Clone(Cloner cloner) {43 return new PWREncoding(this, cloner);44 }45 42 public PWREncoding() 46 43 : base() { 47 44 PermutationWithRepetition = new IntegerVector(); 45 } 46 47 public override IDeepCloneable Clone(Cloner cloner) { 48 return new PWREncoding(this, cloner); 48 49 } 49 50 … … 81 82 return base.Equals(obj); 82 83 } 84 83 85 public override int GetHashCode() { 84 86 if (PermutationWithRepetition.Length == 1) … … 88 90 return 0; 89 91 } 92 90 93 private bool AreEqual(PWREncoding pWREncoding1, PWREncoding pWREncoding2) { 91 94 if (pWREncoding1.PermutationWithRepetition.Length != pWREncoding2.PermutationWithRepetition.Length) … … 97 100 return true; 98 101 } 99 100 101 102 } 102 103 }
Note: See TracChangeset
for help on using the changeset viewer.