Distributed graph coloring using the Recursive Largest First (RLF) algorithm.
More...
#include <RLFGraphColoringMPI.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 |
| |
Distributed graph coloring using the Recursive Largest First (RLF) algorithm.
This class implements a parallel version of the RLF algorithm for graph coloring using MPI.
Definition at line 43 of file RLFGraphColoringMPI.hpp.
◆ RLFGraphColoringMPI()
| geos::graph::RLFGraphColoringMPI::RLFGraphColoringMPI |
( |
MPI_Comm |
comm = MPI_COMM_GEOS | ) |
|
Constructor.
- Parameters
-
| comm | MPI communicator (default: MPI_COMM_GEOS). |
◆ colorGraph() [1/2]
| int geos::graph::RLFGraphColoringMPI::colorGraph |
( |
const std::vector< camp::idx_t > & |
localAdjncy | ) |
|
|
overridevirtual |
Simplified coloring assuming one node per rank.
- Parameters
-
| localAdjncy | Local adjacency list. |
- Returns
- Color of the node.
Implements geos::graph::GraphColoringBase.
◆ colorGraph() [2/2]
| std::vector< int > geos::graph::RLFGraphColoringMPI::colorGraph |
( |
const std::vector< camp::idx_t > & |
localXadj, |
|
|
const std::vector< camp::idx_t > & |
localAdjncy |
|
) |
| |
|
overridevirtual |
Colors a distributed graph.
- Parameters
-
| localXadj | Local adjacency list offsets. |
| localAdjncy | Local adjacency list. |
- Returns
- A vector of assigned colors.
Implements geos::graph::GraphColoringBase.
◆ getNumberOfColors() [1/2]
| size_t geos::graph::RLFGraphColoringMPI::getNumberOfColors |
( |
const int |
color | ) |
const |
Returns the number of distinct colors used, assuming one node per rank.
- Parameters
-
- Returns
- Number of unique colors.
◆ getNumberOfColors() [2/2]
| size_t geos::graph::RLFGraphColoringMPI::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::RLFGraphColoringMPI::isColoringValid |
( |
const std::vector< camp::idx_t > & |
localAdjncy, |
|
|
const int |
localColor |
|
) |
| const |
Validates the coloring of a graph partition.
- Parameters
-
| localAdjncy | adjacency list. |
| localColor | Color assigned to the local node. |
- Returns
- True if the coloring is valid, false otherwise.
The documentation for this class was generated from the following file: