|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Graph coloring algorithms and heuristics. More...
#include <ah-graph-concepts.H>#include <tpl_graph.H>#include <tpl_array.H>#include <tpl_dynMapTree.H>#include <tpl_dynSetTree.H>#include <tpl_sort_utils.H>#include <cookie_guard.H>#include <ah-errors.H>Go to the source code of this file.
Classes | |
| class | Aleph::Greedy_Coloring< GT, SA > |
| Functor wrapper for greedy_coloring. More... | |
| class | Aleph::Welsh_Powell_Coloring< GT, SA > |
| Functor wrapper for welsh_powell_coloring. More... | |
| class | Aleph::DSatur_Coloring< GT, SA > |
| Functor wrapper for dsatur_coloring. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
| namespace | Aleph::graph_coloring_detail |
Functions | |
| void * | Aleph::graph_coloring_detail::encode_color (size_t c) noexcept |
| bool | Aleph::graph_coloring_detail::is_colored (void *cookie) noexcept |
| size_t | Aleph::graph_coloring_detail::decode_color (void *cookie) noexcept |
| size_t | Aleph::graph_coloring_detail::smallest_available (const DynSetTree< size_t > &used) |
| template<AlephGraph GT, ArcFilter< GT > SA> | |
| void | Aleph::graph_coloring_detail::build_undirected_adj (const GT &g, DynMapTree< typename GT::Node *, DynList< typename GT::Node * > > &adj) |
| Internal helper to pre-build undirected adjacency lists. | |
| template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>> | |
| void | Aleph::graph_coloring_detail::validate_no_self_loops (const GT &g) |
| template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>> | |
| size_t | Aleph::greedy_coloring (const GT &g, DynMapTree< typename GT::Node *, size_t > &colors) |
| Greedy graph coloring in iteration order. | |
| template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>> | |
| size_t | Aleph::welsh_powell_coloring (const GT &g, DynMapTree< typename GT::Node *, size_t > &colors) |
| Welsh-Powell graph coloring. | |
| template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>> | |
| size_t | Aleph::dsatur_coloring (const GT &g, DynMapTree< typename GT::Node *, size_t > &colors) |
| DSatur graph coloring (saturation-degree heuristic). | |
| template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>> | |
| bool | Aleph::is_valid_coloring (const GT &g, const DynMapTree< typename GT::Node *, size_t > &colors) |
| Validates a graph coloring. | |
| template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>> | |
| size_t | Aleph::chromatic_number (const GT &g, DynMapTree< typename GT::Node *, size_t > &colors) |
| Computes the exact chromatic number of a small graph. | |
Graph coloring algorithms and heuristics.
This file provides a collection of algorithms for the vertex coloring problem, which aims to assign a color to each node such that no two adjacent nodes share the same color.
Graph coloring is fundamentally an undirected problem. All algorithms in this module treat directed arcs as bidirectional constraints: if there is an arc \(u \to v\), then \(u\)and \(v\)cannot have the same color.
All algorithms use the NODE_COOKIE field of graph nodes for O(1) color lookups. Aleph::Cookie_Saver ensures pre-existing cookies are restored upon exit.
Definition in file Graph_Coloring.H.