Ignore:
Timestamp:
07/12/16 20:03:45 (5 years ago)
Author:
gkronber
Message:

#1966: simplified class names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/BinPacking2D.cs

    r14048 r14049  
    3131  [Item("BinPacking2D", "Represents a single-bin packing for a 2D bin-packing problem.")]
    3232  [StorableClass]
    33   public class BinPacking2D : BinPacking<PackingPosition, RectangularPackingShape, RectangularPackingItem> {
    34 
    35     public BinPacking2D(RectangularPackingShape binMeasures)
     33  public class BinPacking2D : BinPacking<PackingPosition, PackingShape, PackingItem> {
     34
     35    public BinPacking2D(PackingShape binMeasures)
    3636      : base(binMeasures) {
    3737      ExtremePoints = new SortedSet<PackingPosition>(new EPComparer2D());
     
    4848    }
    4949
    50     protected override void GenerateNewExtremePointsForNewItem(RectangularPackingItem newItem, PackingPosition position) {
     50    protected override void GenerateNewExtremePointsForNewItem(PackingItem newItem, PackingPosition position) {
    5151
    5252      int newWidth = position.Rotated ? newItem.Height : newItem.Width;
     
    8585    }
    8686
    87     public override PackingPosition FindExtremePointForItem(RectangularPackingItem measures, bool rotated, bool stackingConstraints) {
    88       RectangularPackingItem item = new RectangularPackingItem(
     87    public override PackingPosition FindExtremePointForItem(PackingItem measures, bool rotated, bool stackingConstraints) {
     88      PackingItem item = new PackingItem(
    8989        rotated ? measures.Height : measures.Width,
    9090        rotated ? measures.Width : measures.Height,
     
    102102      return null;
    103103    }
    104     public override PackingPosition FindPositionBySliding(RectangularPackingItem measures, bool rotated) {
     104    public override PackingPosition FindPositionBySliding(PackingItem measures, bool rotated) {
    105105      PackingPosition currentPosition = new PackingPosition(0,
    106106        BinMeasures.Width - (rotated ? measures.Height : measures.Width),
     
    120120    }
    121121
    122     public override void SlidingBasedPacking(ref List<int> sequence, ItemList<RectangularPackingItem> itemMeasures) {
     122    public override void SlidingBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures) {
    123123      var temp = new List<int>(sequence);
    124124      for (int i = 0; i < temp.Count; i++) {
     
    131131      }
    132132    }
    133     public override void SlidingBasedPacking(ref List<int> sequence, ItemList<RectangularPackingItem> itemMeasures, Dictionary<int, bool> rotationArray) {
     133    public override void SlidingBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures, Dictionary<int, bool> rotationArray) {
    134134      var temp = new List<int>(sequence);
    135135      for (int i = 0; i < temp.Count; i++) {
     
    142142      }
    143143    }
    144     public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<RectangularPackingItem> itemMeasures, bool stackingConstraints) {
     144    public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures, bool stackingConstraints) {
    145145      var temp = new List<int>(sequence);
    146146      foreach (int itemID in temp) {
     
    153153      }
    154154    }
    155     public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<RectangularPackingItem> itemMeasures, bool stackingConstraints, Dictionary<int, bool> rotationArray) {
     155    public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures, bool stackingConstraints, Dictionary<int, bool> rotationArray) {
    156156      var temp = new List<int>(sequence);
    157157      foreach (int itemID in temp) {
     
    186186      return shortestSide;
    187187    }
    188     public override bool IsStaticStable(RectangularPackingItem item, PackingPosition position) {
     188    public override bool IsStaticStable(PackingItem item, PackingPosition position) {
    189189      throw new NotImplementedException();
    190190    }
     
    196196      }
    197197    }
    198     protected override void AddNewItemToOccupationLayers(int itemID, RectangularPackingItem measures, PackingPosition position) {
     198    protected override void AddNewItemToOccupationLayers(int itemID, PackingItem measures, PackingPosition position) {
    199199      int x1 = position.X / 10;
    200200      int x2 = (position.X + (position.Rotated ? measures.Height : measures.Width)) / 10;
     
    206206      return OccupationLayers[position.X / 10];
    207207    }
    208     protected override List<int> GetLayerItemIDs(RectangularPackingItem measures, PackingPosition position) {
     208    protected override List<int> GetLayerItemIDs(PackingItem measures, PackingPosition position) {
    209209      List<int> result = new List<int>();
    210210      int x1 = position.X / 10;
Note: See TracChangeset for help on using the changeset viewer.