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));
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)
const mpreal sum(const mpreal tab[], const unsigned long int n, int &status, mp_rnd_t mode=mpreal::get_default_rnd())
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)