#include <MetisGraph.h>
Public Member Functions | |
MetisGraph () | |
~MetisGraph () | |
void | initMatches () |
void | releaseMatches () |
bool | isMatched (int id) |
GNode | getMatch (int id) |
void | initSubGraphMapTo () |
GNode | getSubGraphMapTo (int id) |
void | releaseSubGraphMapTo () |
GNode | getCoarseGraphMap (int id) |
void | releaseCoarseGraphMap () |
void | initCoarseGraphMap () |
void | setMatch (int id, GNode node) |
void | setSubGraphMapTo (int id, GNode node) |
void | setCoarseGraphMap (int id, GNode node) |
void | incPartWeight (int index, int weight) |
add weight to the weight of a partition | |
void | initPartWeight (size_t nparts) |
initialize the partition weights variable | |
void | setPartWeight (int index, int weight) |
Set the weight of a partition. | |
int | getPartWeight (int part) |
get the weight of a partition | |
void | incNumEdges () |
increase the num of edges by 1 in the graph | |
int | getNumEdges () |
return the num of edges in the graph | |
void | setNumEdges (int num) |
void | setNumNodes (int num) |
int | getNumNodes () |
void | computeTwoWayPartitionParams () |
compute the parameters for two-way refining | |
int | getMaxAdjSum () |
get the maximal adjsum(the sum of the outgoing edge weights of a node) among all the nodes | |
void | computeKWayPartitionParams (int nparts) |
compute the parameters for kway refining | |
void | updateNodeEdAndId (GNode node) |
update the external and internal degree for every node in the graph | |
GGraph * | getGraph () |
return the intgraph in the wrapper | |
void | setGraph (GGraph *graph) |
set the graph for the wrapper | |
MetisGraph * | getFinerGraph () |
return the finer metisGraph | |
void | setFinerGraph (MetisGraph *finer) |
set the finer metisGraph | |
int | getMinCut () |
return the graphcut | |
void | setMinCut (int cut) |
set the graphcut | |
void | incMinCut (int cut) |
increase the graphcut | |
int | getNumOfBoundaryNodes () |
return the number of boundary nodes in the graph | |
void | setBoundaryNode (GNode node) |
set a node as a boundary node | |
void | markBoundaryNode (GNode node) |
void | unMarkBoundaryNode (GNode node) |
void | unsetBoundaryNode (GNode node) |
unmark a boundary nodes | |
void | unsetAllBoundaryNodes () |
unset all the boundary nodes | |
GNodeSet * | getBoundaryNodes () |
return the set of boundary nodes | |
void | initBoundarySet () |
void | computeAdjWgtSums () |
Compute the sum of the weights of all the outgoing edges for each node in the graph. | |
int | computeCut () |
compute graph cut | |
int | computeEdges () |
compute the number of edges in the graph | |
int | computeAdjWgtSum (GNode node) |
Compute the sum of the weights of all the outgoing edges for a node. | |
bool | verify () |
verify if the partitioning is correctly performed by checking the internal maintained graph cut is same as the real graph cut | |
bool | isBalanced (float *tpwgts, float ubfactor) |
check if the partitioning is balanced | |
void | computeKWayBalanceBoundary () |
void | computeKWayBoundary () |
float | computePartitionBalance (int nparts) |
Private Attributes | |
vector< int > | partWeights |
int | mincut |
int | numEdges |
int | numNodes |
MetisGraph * | finerGraph |
GGraph * | graph |
GNodeSet * | boundaryNodes |
GNode * | matches |
bool * | matchFlag |
GNode * | subGraphMaps |
GNode * | coarseGraphMapTo |
MetisGraph::MetisGraph | ( | ) | [inline] |
MetisGraph::~MetisGraph | ( | ) | [inline] |
int MetisGraph::computeAdjWgtSum | ( | GNode | node | ) | [inline] |
Compute the sum of the weights of all the outgoing edges for a node.
void MetisGraph::computeAdjWgtSums | ( | ) | [inline] |
Compute the sum of the weights of all the outgoing edges for each node in the graph.
int MetisGraph::computeCut | ( | ) | [inline] |
compute graph cut
int MetisGraph::computeEdges | ( | ) | [inline] |
compute the number of edges in the graph
void MetisGraph::computeKWayBalanceBoundary | ( | ) | [inline] |
void MetisGraph::computeKWayBoundary | ( | ) | [inline] |
void MetisGraph::computeKWayPartitionParams | ( | int | nparts | ) | [inline] |
compute the parameters for kway refining
float MetisGraph::computePartitionBalance | ( | int | nparts | ) | [inline] |
void MetisGraph::computeTwoWayPartitionParams | ( | ) | [inline] |
compute the parameters for two-way refining
GNodeSet* MetisGraph::getBoundaryNodes | ( | ) | [inline] |
return the set of boundary nodes
GNode MetisGraph::getCoarseGraphMap | ( | int | id | ) | [inline] |
MetisGraph* MetisGraph::getFinerGraph | ( | ) | [inline] |
return the finer metisGraph
GGraph* MetisGraph::getGraph | ( | ) | [inline] |
return the intgraph in the wrapper
GNode MetisGraph::getMatch | ( | int | id | ) | [inline] |
int MetisGraph::getMaxAdjSum | ( | ) | [inline] |
get the maximal adjsum(the sum of the outgoing edge weights of a node) among all the nodes
int MetisGraph::getMinCut | ( | ) | [inline] |
return the graphcut
int MetisGraph::getNumEdges | ( | ) | [inline] |
return the num of edges in the graph
int MetisGraph::getNumNodes | ( | ) | [inline] |
int MetisGraph::getNumOfBoundaryNodes | ( | ) | [inline] |
return the number of boundary nodes in the graph
int MetisGraph::getPartWeight | ( | int | part | ) | [inline] |
get the weight of a partition
part | the index of the partition |
GNode MetisGraph::getSubGraphMapTo | ( | int | id | ) | [inline] |
void MetisGraph::incMinCut | ( | int | cut | ) | [inline] |
increase the graphcut
void MetisGraph::incNumEdges | ( | ) | [inline] |
increase the num of edges by 1 in the graph
void MetisGraph::incPartWeight | ( | int | index, | |
int | weight | |||
) | [inline] |
add weight to the weight of a partition
index | the index of the partition | |
weight | the weight to increase Galois C++ currently does not support abstract lock on integer, so __sync_fetch_and_add is used to add atomically. In the future, this will be changed to use abstract lock |
void MetisGraph::initBoundarySet | ( | ) | [inline] |
void MetisGraph::initCoarseGraphMap | ( | ) | [inline] |
void MetisGraph::initMatches | ( | ) | [inline] |
void MetisGraph::initPartWeight | ( | size_t | nparts | ) | [inline] |
initialize the partition weights variable
void MetisGraph::initSubGraphMapTo | ( | ) | [inline] |
bool MetisGraph::isBalanced | ( | float * | tpwgts, | |
float | ubfactor | |||
) | [inline] |
check if the partitioning is balanced
bool MetisGraph::isMatched | ( | int | id | ) | [inline] |
void MetisGraph::markBoundaryNode | ( | GNode | node | ) | [inline] |
void MetisGraph::releaseCoarseGraphMap | ( | ) | [inline] |
void MetisGraph::releaseMatches | ( | ) | [inline] |
void MetisGraph::releaseSubGraphMapTo | ( | ) | [inline] |
void MetisGraph::setBoundaryNode | ( | GNode | node | ) | [inline] |
set a node as a boundary node
void MetisGraph::setCoarseGraphMap | ( | int | id, | |
GNode | node | |||
) | [inline] |
void MetisGraph::setFinerGraph | ( | MetisGraph * | finer | ) | [inline] |
set the finer metisGraph
void MetisGraph::setGraph | ( | GGraph * | graph | ) | [inline] |
set the graph for the wrapper
void MetisGraph::setMatch | ( | int | id, | |
GNode | node | |||
) | [inline] |
void MetisGraph::setMinCut | ( | int | cut | ) | [inline] |
set the graphcut
void MetisGraph::setNumEdges | ( | int | num | ) | [inline] |
void MetisGraph::setNumNodes | ( | int | num | ) | [inline] |
void MetisGraph::setPartWeight | ( | int | index, | |
int | weight | |||
) | [inline] |
Set the weight of a partition.
index | the index of the partition | |
weight | the weight to set |
void MetisGraph::setSubGraphMapTo | ( | int | id, | |
GNode | node | |||
) | [inline] |
void MetisGraph::unMarkBoundaryNode | ( | GNode | node | ) | [inline] |
void MetisGraph::unsetAllBoundaryNodes | ( | ) | [inline] |
unset all the boundary nodes
void MetisGraph::unsetBoundaryNode | ( | GNode | node | ) | [inline] |
unmark a boundary nodes
void MetisGraph::updateNodeEdAndId | ( | GNode | node | ) | [inline] |
update the external and internal degree for every node in the graph
bool MetisGraph::verify | ( | ) | [inline] |
verify if the partitioning is correctly performed by checking the internal maintained graph cut is same as the real graph cut
GNodeSet* MetisGraph::boundaryNodes [private] |
GNode* MetisGraph::coarseGraphMapTo [private] |
MetisGraph* MetisGraph::finerGraph [private] |
GGraph* MetisGraph::graph [private] |
GNode* MetisGraph::matches [private] |
bool* MetisGraph::matchFlag [private] |
int MetisGraph::mincut [private] |
int MetisGraph::numEdges [private] |
int MetisGraph::numNodes [private] |
vector<int> MetisGraph::partWeights [private] |
GNode* MetisGraph::subGraphMaps [private] |