Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
NodeColoringJohnson.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/basic.h>
37
38namespace ogdf {
39
46public:
50 enum class MinDegreeProcedure {
51 smallestIndex,
52 minDegreeOriginal,
53 maxDegreeOriginal,
54 minDegreeSubgraph,
55 maxDegreeSubgraph
56 };
57
62 NodeColoringJohnson() : m_minDegreeProcedure(MinDegreeProcedure::maxDegreeSubgraph) { }
63
68 inline void setMinDegreeProcedure(MinDegreeProcedure minDegreeProcedure) {
69 m_minDegreeProcedure = minDegreeProcedure;
70 }
71
72 virtual NodeColor call(const Graph& graph, NodeArray<NodeColor>& colors,
73 NodeColor start = 0) override;
74
75private:
77};
78}
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).
Definition Graph_d.h:866
Approximation algorithms for the node coloring problem in graphs.
void setMinDegreeProcedure(MinDegreeProcedure minDegreeProcedure)
Sets the procedure of finding minimum degree nodes.
MinDegreeProcedure m_minDegreeProcedure
NodeColoringJohnson()
The constructor.
virtual NodeColor call(const Graph &graph, NodeArray< NodeColor > &colors, NodeColor start=0) override
The actual algorithm call.
MinDegreeProcedure
Declares procedure to find the minimum degree nodes.
Approximation algorithms for the node coloring problem in graphs.
unsigned int NodeColor
Data type of the node colors.
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.