Helper class to define Metis graph. More...
Helper class to define Metis graph.
graph | structure that store the graph |
Definition at line 73 of file metis_util.hpp.
#include <metis_util.hpp>
Public Member Functions | |
Metis (Graph &g, size_t nc, bool useWeights) | |
Constructor. | |
Metis (Graph &g, size_t nc) | |
Constructor. | |
Metis (Graph &g) | |
Constructor. | |
void | initMetisGraph (int nc, bool useWeights) |
Initialize the METIS graph. | |
~Metis () | |
destructor | |
template<unsigned int i> | |
void | decompose () |
Decompose the graph. | |
template<unsigned int i, typename Graph_part > | |
void | decompose (Graph_part &gp) |
Decompose the graph. | |
void | onTest (bool testing) |
It set Metis on test. | |
void | setDistTol (real_t tol) |
Distribution tolerance. | |
size_t | get_ndec () |
Get the decomposition counter. | |
void | inc_dec () |
Increment the decomposition counter. | |
Private Member Functions | |
void | constructAdjList (Graph &g) |
Construct Adjacency list. | |
void | constructAdjListWithWeights (Graph &g) |
Construct Adjacency list. | |
void | reset_pointer () |
Private Attributes | |
Metis_graph | Mg |
Graph in metis reppresentation. | |
Graph & | g |
Original graph. | |
size_t | n_dec |
indicate how many time decompose/refine/re-decompose has been called | |
real_t | dist_tol = 1.05 |
Distribution tolerance. | |
Constructor.
Construct a metis graph from Graph_CSR
g | Graph we want to convert to decompose |
nc | number of partitions |
useWeights | tells if weights are used or not |
Definition at line 219 of file metis_util.hpp.
Constructor.
Construct a metis graph from Graph_CSR
g | Graph we want to convert to decompose |
nc | number of partitions |
Definition at line 234 of file metis_util.hpp.
Constructor.
This constructor does not initialize the internal metis graph you have to use initMetisGraph to initialize
g | Graph we want to convert to decompose |
Definition at line 249 of file metis_util.hpp.
destructor
Destructor, It destroy all the memory allocated
Definition at line 346 of file metis_util.hpp.
|
inlineprivate |
Construct Adjacency list.
g | Graph |
starting point in the adjacency list
Definition at line 92 of file metis_util.hpp.
|
inlineprivate |
Construct Adjacency list.
g | Graph |
starting point in the adjacency list
Definition at line 133 of file metis_util.hpp.
Decompose the graph.
i | which property store the decomposition |
Definition at line 413 of file metis_util.hpp.
|
inline |
Decompose the graph.
i | which property store the decomposition |
Definition at line 460 of file metis_util.hpp.
|
inline |
Get the decomposition counter.
Definition at line 524 of file metis_util.hpp.
|
inline |
Increment the decomposition counter.
Definition at line 533 of file metis_util.hpp.
|
inline |
Initialize the METIS graph.
nc | number of partitions |
useWeights | use the weights on the graph |
Set to null the partition load imbalance tolerance
Set tp null additional option for the graph partitioning
set the objective value
Is an output vector containing the partition for each vertex
Definition at line 262 of file metis_util.hpp.
|
inline |
It set Metis on test.
testing | set to true to disable the testing |
At the moment disable the seed randomness to keep the result reproducible
Definition at line 492 of file metis_util.hpp.
|
inlineprivate |
Definition at line 191 of file metis_util.hpp.
|
inline |
|
private |
Distribution tolerance.
Definition at line 85 of file metis_util.hpp.
|
private |
Original graph.
Definition at line 79 of file metis_util.hpp.
|
private |
Graph in metis reppresentation.
Definition at line 76 of file metis_util.hpp.
|
private |
indicate how many time decompose/refine/re-decompose has been called
Definition at line 82 of file metis_util.hpp.