Package micycle.pgs

Enum Class PGS_Optimisation.RectPackHeuristic

java.lang.Object
java.lang.Enum<PGS_Optimisation.RectPackHeuristic>
micycle.pgs.PGS_Optimisation.RectPackHeuristic
All Implemented Interfaces:
Serializable, Comparable<PGS_Optimisation.RectPackHeuristic>, Constable
Enclosing class:
PGS_Optimisation

public static enum PGS_Optimisation.RectPackHeuristic extends Enum<PGS_Optimisation.RectPackHeuristic>
Various packing heuristics for rectpack().
  • Enum Constant Details

    • BestAreaFit

      public static final PGS_Optimisation.RectPackHeuristic BestAreaFit
      Packs rectangles such that the wasted/empty area within the bin is minimised. This heuristic tends to generate packings that are less dense but are better at covering the whole area (particularly if there is much spare area) than the other heuristics.
    • TouchingPerimeter

      public static final PGS_Optimisation.RectPackHeuristic TouchingPerimeter
      Packs rectangles such that the total touching perimeter length is maximised. In practice, rectangles are packed against the left-most and upper-most boundary of the bin first.
    • TopRightCornerDistance

      public static final PGS_Optimisation.RectPackHeuristic TopRightCornerDistance
      Packs rectangles such that the distance between the top-right corner of each rectangle and that of the bin is maximised.
  • Method Details

    • values

      public static PGS_Optimisation.RectPackHeuristic[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PGS_Optimisation.RectPackHeuristic valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null