Class Piece

java.lang.Object
topics.branchandbound.rectangles.Piece

class Piece extends Object

Rectangular Piece

Represents a distinct rectangular entity defined by its width and height, utilized as the fundamental unit of placement within the 2D bin packing variants of the Branch and Bound algorithm.

The piece's effective footprint on the board is determined dynamically by the algorithmic engine based on its assigned PieceOrientation.

Author:
vicegd
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) int
    The primary horizontal dimension (width).
    (package private) int
    The primary vertical dimension (height).
  • Constructor Summary

    Constructors
    Constructor
    Description
    Piece(int x, int y)
    Constructs a new rectangular piece with the specified dimensions.
  • Method Summary

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • x

      int x
      The primary horizontal dimension (width).
    • y

      int y
      The primary vertical dimension (height).
  • Constructor Details

    • Piece

      public Piece(int x, int y)
      Constructs a new rectangular piece with the specified dimensions.
      Parameters:
      x - The width of the piece.
      y - The height of the piece.