Go to the source code of this file.
Functions | |
graph_t * | SetupGraph (ctrl_t *ctrl, idx_t nvtxs, idx_t ncon, idx_t *xadj, idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt) |
void | SetupGraph_tvwgt (graph_t *graph) |
void | SetupGraph_label (graph_t *graph) |
graph_t * | SetupSplitGraph (graph_t *graph, idx_t snvtxs, idx_t snedges) |
graph_t * | CreateGraph (void) |
void | InitGraph (graph_t *graph) |
void | FreeRData (graph_t *graph) |
void | FreeGraph (graph_t **r_graph) |
$Id: graph.c 10513 2011-07-07 22:06:03Z karypis $
Definition in file graph.c.
graph_t* SetupGraph | ( | ctrl_t * | ctrl, | |
idx_t | nvtxs, | |||
idx_t | ncon, | |||
idx_t * | xadj, | |||
idx_t * | adjncy, | |||
idx_t * | vwgt, | |||
idx_t * | vsize, | |||
idx_t * | adjwgt | |||
) |
This function sets up the graph from the user input
Definition at line 17 of file graph.c.
References graph_t::adjncy, graph_t::adjwgt, CheckGraph(), CreateGraph(), graph_t::free_adjncy, graph_t::free_adjwgt, graph_t::free_vsize, graph_t::free_vwgt, graph_t::free_xadj, graph_t::invtvwgt, METIS_OBJTYPE_VOL, METIS_OP_OMETIS, METIS_OP_PMETIS, graph_t::ncon, graph_t::nedges, ctrl_t::numflag, graph_t::nvtxs, ctrl_t::objtype, ctrl_t::optype, SetupGraph_label(), SetupGraph_tvwgt(), graph_t::tvwgt, graph_t::vsize, graph_t::vwgt, and graph_t::xadj.
Referenced by METIS_ComputeVertexSeparator(), METIS_NodeND(), METIS_NodeNDP(), METIS_NodeRefine(), METIS_PartGraphKway(), and METIS_PartGraphRecursive().
void SetupGraph_tvwgt | ( | graph_t * | graph | ) |
Set's up the tvwgt/invtvwgt info
Definition at line 99 of file graph.c.
References graph_t::invtvwgt, graph_t::ncon, graph_t::nvtxs, graph_t::tvwgt, and graph_t::vwgt.
Referenced by CompressGraph(), PruneGraph(), SetupGraph(), SplitGraphOrder(), SplitGraphOrderCC(), and SplitGraphPart().
void SetupGraph_label | ( | graph_t * | graph | ) |
Set's up the label info
Definition at line 118 of file graph.c.
References graph_t::label, and graph_t::nvtxs.
Referenced by CompressGraph(), PruneGraph(), and SetupGraph().
Setup the various arrays for the splitted graph
Definition at line 133 of file graph.c.
References graph_t::adjncy, graph_t::adjwgt, CreateGraph(), graph_t::invtvwgt, graph_t::label, graph_t::ncon, graph_t::nedges, graph_t::nvtxs, graph_t::tvwgt, graph_t::vsize, graph_t::vwgt, and graph_t::xadj.
Referenced by SplitGraphOrder(), SplitGraphOrderCC(), and SplitGraphPart().
graph_t* CreateGraph | ( | void | ) |
This function creates and initializes a graph_t data structure
Definition at line 162 of file graph.c.
References gk_malloc(), and InitGraph().
Referenced by CompressGraph(), FixGraph(), main(), PruneGraph(), ReadGraph(), SetupCoarseGraph(), SetupGraph(), and SetupSplitGraph().
void InitGraph | ( | graph_t * | graph | ) |
This function initializes a graph_t data structure
Definition at line 177 of file graph.c.
Referenced by CreateGraph().
void FreeRData | ( | graph_t * | graph | ) |
This function frees the refinement/partition memory stored in a graph
Definition at line 228 of file graph.c.
References graph_t::bndind, graph_t::bndptr, graph_t::ckrinfo, graph_t::ed, gk_free(), graph_t::id, graph_t::nrinfo, graph_t::pwgts, graph_t::vkrinfo, and graph_t::where.
Referenced by ConstructMinCoverSeparator(), ConstructSeparator(), FreeGraph(), MlevelKWayPartitioning(), MlevelNodeBisectionL2(), MlevelNodeBisectionMultiple(), and MultilevelBisect().
void FreeGraph | ( | graph_t ** | r_graph | ) |
This function deallocates any memory stored in a graph
Definition at line 247 of file graph.c.
References graph_t::adjncy, graph_t::adjwgt, graph_t::cmap, graph_t::free_adjncy, graph_t::free_adjwgt, graph_t::free_vsize, graph_t::free_vwgt, graph_t::free_xadj, FreeRData(), gk_free(), graph_t::invtvwgt, graph_t::label, graph_t::tvwgt, graph_t::vsize, graph_t::vwgt, and graph_t::xadj.
Referenced by main(), METIS_ComputeVertexSeparator(), METIS_NodeRefine(), MlevelKWayPartitioning(), MlevelNestedDissection(), MlevelNestedDissectionCC(), MlevelNestedDissectionP(), MlevelRecursiveBisection(), Project2WayNodePartition(), Project2WayPartition(), and ProjectKWayPartition().