Changeset 14041
- Timestamp:
- 07/12/16 17:52:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/MultiComponentVectorEncoding.cs
r13032 r14041 36 36 37 37 [Storable] 38 public ObservableDictionary<int, ItemList<PackingInformation>> PackingInformations { get;set;}38 public ObservableDictionary<int, ItemList<PackingInformation>> PackingInformations { get; set; } 39 39 40 40 public int NrOfBins { get { return PackingInformations.Count; } } 41 public int NrOfItems { 41 public int NrOfItems { 42 42 get { 43 43 int nrOfItems = 0; 44 44 foreach (var entry in PackingInformations) { nrOfItems += entry.Value.Count; } 45 45 return nrOfItems; 46 } 47 } 46 } 47 } 48 48 49 49 [StorableConstructor] … … 51 51 protected MultiComponentVectorEncoding(MultiComponentVectorEncoding original, Cloner cloner) 52 52 : base(original, cloner) { 53 this.PackingInformations = new ObservableDictionary<int,ItemList<PackingInformation>>();53 this.PackingInformations = new ObservableDictionary<int, ItemList<PackingInformation>>(); 54 54 foreach (var entry in original.PackingInformations) { 55 55 this.PackingInformations[entry.Key] = cloner.Clone(entry.Value); … … 62 62 public MultiComponentVectorEncoding() 63 63 : base() { 64 64 PackingInformations = new ObservableDictionary<int, ItemList<PackingInformation>>(); 65 65 } 66 66 … … 127 127 128 128 public PackingInformation(int itemID, bool rotated) { 129 this.ItemID 130 this.Rotated 131 } 129 this.ItemID = itemID; 130 this.Rotated = rotated; 131 } 132 132 public PackingInformation(PackingInformation original) { 133 133 this.ItemID = original.ItemID; … … 139 139 protected PackingInformation(PackingInformation original, Cloner cloner) 140 140 : base(original, cloner) { 141 this.ItemID= original.ItemID;142 this.Rotated= original.Rotated;141 this.ItemID = original.ItemID; 142 this.Rotated = original.Rotated; 143 143 } 144 144 public override IDeepCloneable Clone(Cloner cloner) {
Note: See TracChangeset
for help on using the changeset viewer.