Changeset 9596 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/MultiComponentVectorEncoding.cs
- Timestamp:
- 06/07/13 01:20:12 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/MultiComponentVectorEncoding.cs
r9563 r9596 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Text; 24 25 using HeuristicLab.Collections; … … 64 65 : base() { 65 66 PackingInformations = new ObservableDictionary<int, ItemList<PackingInformation>>(); 66 } 67 } 68 69 public List<List<int>> GenerateSequenceMatrix() { 70 List<List<int>> result = new List<List<int>>(); 71 foreach (var bi in PackingInformations) { 72 var temp = new List<int>(); 73 foreach (var piEntry in bi.Value) { 74 temp.Add(piEntry.ItemID); 75 } 76 result.Add(temp); 77 } 78 return result; 79 } 80 public Dictionary<int, bool> GenerateRotationArray() { 81 Dictionary<int, bool> result = new Dictionary<int, bool>(); 82 foreach (var bi in PackingInformations) 83 foreach (var pi in bi.Value) 84 result[pi.ItemID] = pi.Rotated; 85 return result; 86 } 87 88 67 89 68 90 public override string ToString() {
Note: See TracChangeset
for help on using the changeset viewer.