28 graph->
nedges = xadj[nvtxs];
44 vwgt = graph->
vwgt =
ismalloc(ncon*nvtxs, 1,
"SetupGraph: vwgt");
49 for (i=0; i<
ncon; i++) {
62 vsize = graph->
vsize =
ismalloc(nvtxs, 1,
"SetupGraph: vsize");
67 for (i=0; i<nvtxs; i++) {
68 for (j=xadj[i]; j<xadj[i+1]; j++)
69 adjwgt[j] = 1+vsize[i]+vsize[adjncy[j]];
108 for (i=0; i<graph->
ncon; i++) {
125 for (i=0; i<graph->
nvtxs; i++)
139 sgraph->
nvtxs = snvtxs;
144 sgraph->
xadj =
imalloc(snvtxs+1,
"SetupSplitGraph: xadj");
146 sgraph->
adjncy =
imalloc(snedges,
"SetupSplitGraph: adjncy");
147 sgraph->
adjwgt =
imalloc(snedges,
"SetupSplitGraph: adjwgt");
148 sgraph->
label =
imalloc(snvtxs,
"SetupSplitGraph: label");
153 sgraph->
vsize =
imalloc(snvtxs,
"SetupSplitGraph: vsize");
179 memset((
void *)graph, 0,
sizeof(
graph_t));
193 graph->adjncy =
NULL;
194 graph->adjwgt =
NULL;
198 graph->invtvwgt =
NULL;
201 graph->free_xadj = 1;
202 graph->free_vwgt = 1;
203 graph->free_vsize = 1;
204 graph->free_adjncy = 1;
205 graph->free_adjwgt = 1;
213 graph->bndptr =
NULL;
214 graph->bndind =
NULL;
215 graph->nrinfo =
NULL;
216 graph->ckrinfo =
NULL;
217 graph->vkrinfo =
NULL;
220 graph->coarser =
NULL;
idx_t idx_t idx_t idx_t * vwgt
void FreeGraph(graph_t **r_graph)
void FreeRData(graph_t *graph)
void InitGraph(graph_t *graph)
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)
NonlinearFactorGraph graph
idx_t idx_t idx_t idx_t idx_t * vsize
#define ASSERT(expression)
idx_t idx_t idx_t idx_t idx_t idx_t * adjwgt
graph_t * SetupSplitGraph(graph_t *graph, idx_t snvtxs, idx_t snedges)
void * gk_malloc(size_t nbytes, char *msg)
void gk_free(void **ptr1,...)
idx_t idx_t idx_t * adjncy
void SetupGraph_label(graph_t *graph)
graph_t * CreateGraph(void)
void SetupGraph_tvwgt(graph_t *graph)