| GEOS
    | 
Graph coloring implementation using the Recursive Largest First (RLF) algorithm. More...
#include <RLFGraphColoring.hpp>

| Public Member Functions | |
| RLFGraphColoring () | |
| Constructor. | |
| ~RLFGraphColoring () | |
| Destructor. | |
| std::vector< int > | colorGraph (const std::vector< camp::idx_t > &xadj, const std::vector< camp::idx_t > &adjncy) override | 
| Colors a graph.  More... | |
| int | colorGraph (const std::vector< camp::idx_t > &localAdjncy) override | 
| Colors a graph assuming one node per rank.  More... | |
| size_t | getNumberOfColors (const std::vector< int > &colors) const | 
| Returns the number of distinct colors used.  More... | |
| bool | isColoringValid (const std::vector< camp::idx_t > &xadj, const std::vector< camp::idx_t > &adjncy, const std::vector< int > &colors) const | 
| Validates the coloring of a graph.  More... | |
|  Public Member Functions inherited from geos::graph::GraphColoringBase | |
| GraphColoringBase (MPI_Comm comm=MPI_COMM_GEOS) | |
| Constructor.  More... | |
| virtual | ~GraphColoringBase () | 
| Virtual destructor. | |
| Additional Inherited Members | |
|  Static Public Member Functions inherited from geos::graph::GraphColoringBase | |
| static bool | isColoringValid (const std::vector< camp::idx_t > &xadj, const std::vector< camp::idx_t > &adjncy, const std::vector< int > &coloring) | 
| Checks the validity of the graph coloring.  More... | |
| static bool | isColoringValid (const std::vector< camp::idx_t > &adjncy, const int color, MPI_Comm comm) | 
| Checks the validity of the graph coloring assuming one node per rank.  More... | |
| static size_t | getNumberOfColors (const std::vector< int > &colors) | 
| Counts the number of distinct colors.  More... | |
| static size_t | getNumberOfColors (const std::vector< int > &colors, MPI_Comm comm) | 
| Counts the number of distinct colors (parallel version).  More... | |
| static size_t | getNumberOfColors (const int color, MPI_Comm comm) | 
| Counts the number of distinct colors assuming one node per rank (parallel version).  More... | |
|  Protected Attributes inherited from geos::graph::GraphColoringBase | |
| MPI_Comm | m_comm | 
Graph coloring implementation using the Recursive Largest First (RLF) algorithm.
This class implements the RLF algorithm to assign colors to graph nodes such that no two adjacent nodes share the same color. It supports both full adjacency-based coloring and simplified one-node-per-rank coloring.
Reference: Leighton, F. (1979). "A graph coloring algorithm for large scheduling problems". Journal of Research of the National Bureau of Standards. 84 (6): 489–503.
Definition at line 45 of file RLFGraphColoring.hpp.
| 
 | overridevirtual | 
Colors a graph assuming one node per rank.
| localAdjncy | Local adjacency list. | 
Implements geos::graph::GraphColoringBase.
| 
 | overridevirtual | 
Colors a graph.
| xadj | Adjacency list offsets. | 
| adjncy | Adjacency list. | 
Implements geos::graph::GraphColoringBase.
| size_t geos::graph::RLFGraphColoring::getNumberOfColors | ( | const std::vector< int > & | colors | ) | const | 
Returns the number of distinct colors used.
| colors | Vector of color assignments. | 
| bool geos::graph::RLFGraphColoring::isColoringValid | ( | const std::vector< camp::idx_t > & | xadj, | 
| const std::vector< camp::idx_t > & | adjncy, | ||
| const std::vector< int > & | colors | ||
| ) | const | 
Validates the coloring of a graph.
| xadj | Adjacency list offsets. | 
| adjncy | Adjacency list. | 
| colors | Vector of assigned colors. |