Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/07/13 01:20:12 (11 years ago)
Author:
jhelm
Message:

#1966: More refactoring; Added more sophisticated structures for packing-plan and bin-packing representation; Transferred parts of the decoding-algorithms to these structures; Did some more refactoring and cleanup;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/GroupingVector/GroupingVectorEncoding.cs

    r9348 r9596  
    2020#endregion
    2121
     22using System.Collections.Generic;
     23using System.Linq;
    2224using System.Text;
    2325using HeuristicLab.Common;
     
    5052        GroupingVector = new IntegerVector();
    5153    }
     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
    5267
    5368    public override string ToString() {
Note: See TracChangeset for help on using the changeset viewer.