Changeset 9596 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/GroupingVector
- 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/GroupingVector/GroupingVectorEncoding.cs
r9348 r9596 20 20 #endregion 21 21 22 using System.Collections.Generic; 23 using System.Linq; 22 24 using System.Text; 23 25 using HeuristicLab.Common; … … 50 52 GroupingVector = new IntegerVector(); 51 53 } 54 55 public List<List<int>> GenerateSequenceMatrix() { 56 List<List<int>> result = new List<List<int>>(); 57 int nrOfBins = GroupingVector.Max() + 1; 58 for (int i = 0; i < nrOfBins; i++) 59 result.Add(new List<int>()); 60 for (int i = 0; i < GroupingVector.Length; i++) { 61 result[GroupingVector[i]].Add(i); 62 } 63 return result; 64 } 65 66 52 67 53 68 public override string ToString() {
Note: See TracChangeset
for help on using the changeset viewer.