52 return colorByDegree(graph,
colors, start);
Includes declaration of graph class.
Template of base class of node coloring algorithms.
Basic declarations, included by all source files.
Data type for general directed graphs (adjacency list representation).
Doubly linked lists (maintaining the length of the list).
Approximation algorithms for the node coloring problem in graphs.
unsigned int NodeColor
Data type of the node colors.
Class for comparing two nodes by the node degree.
OGDF_AUGMENT_STATICCOMPARER(node)
static int compare(const node &v1, const node &v2)
Compares two nodes by using the node degree.
Approximation algorithms for the node coloring problem in graphs.
virtual NodeColor colorByDegree(const Graph &graph, NodeArray< NodeColor > &colors, NodeColor start=0)
Performs the sequential nodes coloring.
virtual NodeColor fromPermutation(const Graph &graph, NodeArray< NodeColor > &colors, List< node > &nodePermutation, NodeColor start=0, bool lookForNeighbors=false)
Colors a graph with the sequential coloring algorithm from a given node permutation.
virtual void sortByDegree(List< node > &nodes)
Sorts a list of nodes decreasingly by the degree.
virtual NodeColor colorByIndex(const Graph &graph, NodeArray< NodeColor > &colors, NodeColor start=0)
Performs the sequential nodes coloring.
virtual NodeColor call(const Graph &graph, NodeArray< NodeColor > &colors, NodeColor start=0) override
The actual algorithm call.
Class for the representation of nodes.
int degree() const
Returns the degree of the node (indegree + outdegree).
const Graph * graphOf() const
Returns the graph containing this node (debug only).
RegisteredArray for nodes, edges and adjEntries of a graph.
Declarations for Comparer objects.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.
const std::array< Color, 63 > colors
An array of 63 different colors to cycle through.