Package micycle.pgs
Enum Class 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()
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPacks rectangles such that the wasted/empty area within the bin is minimised.Packs rectangles such that the distance between the top-right corner of each rectangle and that of the bin is maximised.Packs rectangles such that the total touching perimeter length is maximised. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static PGS_Optimisation.RectPackHeuristic[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
Packs rectangles such that the distance between the top-right corner of each rectangle and that of the bin is maximised.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-