Free cookie consent management tool by TermsFeed Policy Generator

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

#1966: simplified class names

File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/PackingShape.cs

    r14048 r14049  
    2929
    3030namespace HeuristicLab.Problems.BinPacking3D {
    31   [Item("CuboidPackingShape", "Represents the cuboid measures (width, height, depth) of a three-dimensional cuboidic bin-packing object.")]
     31  [Item("PackingShape (3d)", "Represents the cuboid measures (width, height, depth) of a three-dimensional cuboidic bin-packing object.")]
    3232  [StorableClass]
    33   public class CuboidPackingShape : PackingShape<PackingPosition>, IComparable<CuboidPackingShape> {
     33  public class PackingShape : PackingShape<PackingPosition>, IComparable<PackingShape> {
    3434    public IFixedValueParameter<IntValue> HeightParameter {
    3535      get { return (IFixedValueParameter<IntValue>)Parameters["Height"]; }
     
    5858
    5959    [StorableConstructor]
    60     protected CuboidPackingShape(bool deserializing) : base(deserializing) { }
    61     protected CuboidPackingShape(CuboidPackingShape original, Cloner cloner)
     60    protected PackingShape(bool deserializing) : base(deserializing) { }
     61    protected PackingShape(PackingShape original, Cloner cloner)
    6262      : base(original, cloner) {
    6363      RegisterEvents();
    6464    }
    65     public CuboidPackingShape()
     65    public PackingShape()
    6666      : base() {
    6767      Parameters.Add(new FixedValueParameter<IntValue>("Width"));
     
    7272    }
    7373
    74     public CuboidPackingShape(int width, int height, int depth)
     74    public PackingShape(int width, int height, int depth)
    7575      : this() {
    7676      this.Width = width;
     
    8080
    8181    public override IDeepCloneable Clone(Cloner cloner) {
    82       return new CuboidPackingShape(this, cloner);
     82      return new PackingShape(this, cloner);
    8383    }
    8484
     
    101101    #region IComparable Members
    102102
    103     public int CompareTo(CuboidPackingShape other) {
     103    public int CompareTo(PackingShape other) {
    104104      //Using "Clustered-Area-Height"-comparison as descr
    105105
     
    114114
    115115    public override int CompareTo(object obj) {
    116       var other = (CuboidPackingShape)obj;
     116      var other = (PackingShape)obj;
    117117      if (other != null) return CompareTo(other);
    118118      else throw new ArgumentException(string.Format("Cannot compare with object {0}", obj), "obj");
     
    128128      public int y2;
    129129      public int z2;
    130       public CuboidDiagonal(CuboidPackingShape myShape) : this(new PackingPosition(0, 0, 0, 0), myShape) { }
    131       public CuboidDiagonal(PackingPosition myPosition, CuboidPackingShape myShape) {
     130      public CuboidDiagonal(PackingShape myShape) : this(new PackingPosition(0, 0, 0, 0), myShape) { }
     131      public CuboidDiagonal(PackingPosition myPosition, PackingShape myShape) {
    132132        x1 = myPosition.X;
    133133        y1 = myPosition.Y;
     
    153153    }
    154154    public override bool Encloses(PackingPosition checkedPosition, PackingShape<PackingPosition> checkedShape) {
    155       return Encloses(checkedPosition, (CuboidPackingShape)checkedShape);
     155      return Encloses(checkedPosition, (PackingShape)checkedShape);
    156156    }
    157     private bool Encloses(PackingPosition checkedPosition, CuboidPackingShape checkedShape) {
     157    private bool Encloses(PackingPosition checkedPosition, PackingShape checkedShape) {
    158158      return Encloses(new CuboidDiagonal(this), new CuboidDiagonal(checkedPosition, checkedShape));
    159159    }
     
    168168
    169169    public override bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, PackingShape<PackingPosition> checkedShape) {
    170       return Overlaps(myPosition, checkedPosition, (CuboidPackingShape)checkedShape);
     170      return Overlaps(myPosition, checkedPosition, (PackingShape)checkedShape);
    171171    }
    172     private bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, CuboidPackingShape checkedShape) {
     172    private bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, PackingShape checkedShape) {
    173173      return Overlaps(new CuboidDiagonal(myPosition, this), new CuboidDiagonal(checkedPosition, checkedShape));
    174174    }
Note: See TracChangeset for help on using the changeset viewer.