Package micycle.pgs
Enum Class PGS_Coloring.ColoringAlgorithm
- All Implemented Interfaces:
Serializable
,Comparable<PGS_Coloring.ColoringAlgorithm>
,Constable
- Enclosing class:
- PGS_Coloring
Specifies the algorithm/heuristic used by the underlying graph coloring
process to find an approximate minimal coloring for mesh faces.
RLF
, followed by DSATUR
generally produce the
"best" colorings (as measured by chromatic number, where lower is better).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFinds the coarsest coloring of a graph.DSATUR (saturation degree ordering) is a variant on Largest Degree Ordering where the vertices are ordered in decreasing order by "saturation degree", defined as the number of distinct colors in the vertex neighborhood.Finds a coloring using a genetic algorithm.The largest degree first greedy coloring algorithm.The greedy coloring algorithm with a random vertex ordering.Recursive largest-first coloring (recommended).Repeatedly calls the recursive largest-first (RLF) algorithm until a 4-coloring (or less) is found.The smallest degree last greedy coloring algorithm. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static PGS_Coloring.ColoringAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RANDOM
The greedy coloring algorithm with a random vertex ordering. -
LARGEST_DEGREE_FIRST
The largest degree first greedy coloring algorithm.This algorithm orders the vertices in decreasing order of degree, the idea being that the large degree vertices can be colored more easily.
-
SMALLEST_DEGREE_LAST
The smallest degree last greedy coloring algorithm. This is the greedy coloring algorithm with the smallest-last ordering of the vertices. -
DSATUR
DSATUR (saturation degree ordering) is a variant on Largest Degree Ordering where the vertices are ordered in decreasing order by "saturation degree", defined as the number of distinct colors in the vertex neighborhood. -
COARSE
Finds the coarsest coloring of a graph. -
RLF
Recursive largest-first coloring (recommended). -
RLF_BRUTE_FORCE_4COLOR
Repeatedly calls the recursive largest-first (RLF) algorithm until a 4-coloring (or less) is found. The operation will break after 250 attempts if a 4-coloring (or less) is still not found; in this case, the result from the final attempt is returned. -
GENETIC
Finds a coloring using a genetic algorithm. Unlike all other algorithms this specifically targets a chromaticity of 4 (falls back to 5 if no solution is found).
-
-
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
-