Graph coloring implementation using the Zoltan library.
More...
#include <ZoltanGraphColoring.hpp>
|
| 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...
|
| |
| MPI_Comm | m_comm |
| |
Graph coloring implementation using the Zoltan library.
This class uses Zoltan's distributed graph coloring capabilities to assign colors to graph vertices in parallel. It supports both full adjacency-based coloring and simplified one-node-per-rank coloring.
Definition at line 44 of file ZoltanGraphColoring.hpp.
◆ ZoltanGraphColoring()
| geos::graph::ZoltanGraphColoring::ZoltanGraphColoring |
( |
MPI_Comm |
comm = MPI_COMM_GEOS | ) |
|
Constructor.
- Parameters
-
| comm | MPI communicator (default: MPI_COMM_GEOS). |
◆ colorGraph() [1/2]
| int geos::graph::ZoltanGraphColoring::colorGraph |
( |
const std::vector< camp::idx_t > & |
adjncy | ) |
|
|
overridevirtual |
Simplified coloring assuming one node per rank.
- Parameters
-
| adjncy | Local adjacency list. |
- Returns
- Number of colors used.
Implements geos::graph::GraphColoringBase.
◆ colorGraph() [2/2]
| std::vector< int > geos::graph::ZoltanGraphColoring::colorGraph |
( |
const std::vector< camp::idx_t > & |
xadj, |
|
|
const std::vector< camp::idx_t > & |
adjncy |
|
) |
| |
|
overridevirtual |
Colors a graph.
- Parameters
-
| xadj | Adjacency list offsets. |
| adjncy | Adjacency list. |
- Returns
- A vector of assigned colors.
Implements geos::graph::GraphColoringBase.
◆ getNumberOfColors() [1/2]
| size_t geos::graph::ZoltanGraphColoring::getNumberOfColors |
( |
const int |
color | ) |
const |
Returns the number of colors assuming one node per rank.
- Parameters
-
- Returns
- Number of colors.
◆ getNumberOfColors() [2/2]
| size_t geos::graph::ZoltanGraphColoring::getNumberOfColors |
( |
const std::vector< int > & |
colors | ) |
const |
Returns the number of distinct colors used.
- Parameters
-
| colors | Vector of color assignments. |
- Returns
- Number of unique colors.
◆ isColoringValid()
| bool geos::graph::ZoltanGraphColoring::isColoringValid |
( |
const std::vector< camp::idx_t > & |
adjncy, |
|
|
const int |
color |
|
) |
| const |
Validates the coloring of a graph assuming one node per rank.
- Parameters
-
| adjncy | Adjacency list. |
| color | Color of the node. |
- Returns
- True if the coloring is valid, false otherwise.
The documentation for this class was generated from the following file: