Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
38 namespace ogdf {
39 
46 public:
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 
75 private:
77 };
78 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::colors
const std::array< Color, 63 > colors
An array of 63 different colors to cycle through.
ogdf::NodeColoringJohnson::m_minDegreeProcedure
MinDegreeProcedure m_minDegreeProcedure
Definition: NodeColoringJohnson.h:76
ogdf::NodeColoringJohnson::NodeColoringJohnson
NodeColoringJohnson()
The constructor.
Definition: NodeColoringJohnson.h:62
ogdf::NodeColoringModule
Approximation algorithms for the node coloring problem in graphs.
Definition: NodeColoringModule.h:48
ogdf::NodeColoringJohnson::setMinDegreeProcedure
void setMinDegreeProcedure(MinDegreeProcedure minDegreeProcedure)
Sets the procedure of finding minimum degree nodes.
Definition: NodeColoringJohnson.h:68
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
NodeColoringModule.h
Template of base class of node coloring algorithms.
ogdf::NodeColoringJohnson
Approximation algorithms for the node coloring problem in graphs.
Definition: NodeColoringJohnson.h:45
basic.h
Basic declarations, included by all source files.
ogdf::NodeColoringJohnson::MinDegreeProcedure
MinDegreeProcedure
Declares procedure to find the minimum degree nodes.
Definition: NodeColoringJohnson.h:50
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101