Go to the documentation of this file.
26 for (cut=0,
i=0;
i<
graph->nvtxs;
i++) {
33 for (cut=0,
i=0;
i<
graph->nvtxs;
i++) {
64 for (
i=0;
i<nvtxs;
i++) {
126 nvtxs =
graph->nvtxs;
130 bndptr =
graph->bndptr;
131 bndind =
graph->bndind;
133 for (nbnd=0,
i=0;
i<nvtxs;
i++) {
163 nvtxs =
graph->nvtxs;
167 bndptr =
graph->bndptr;
168 bndind =
graph->bndind;
170 for (nbnd=0,
i=0;
i<nvtxs;
i++) {
200 nvtxs =
graph->nvtxs;
204 bndptr =
graph->bndptr;
205 bndind =
graph->bndind;
207 for (nbnd=0,
i=0;
i<nvtxs;
i++) {
214 for (
i=0;
i<nvtxs;
i++) {
243 i,
j, nbrs[
i].pid, nbrs[
j].pid));
259 idx_t edegrees[2], pwgts[3];
261 nvtxs =
graph->nvtxs;
271 pwgts[0] = pwgts[1] = pwgts[2] = 0;
272 for (
i=0;
i<nvtxs;
i++) {
274 pwgts[me] +=
vwgt[
i];
277 edegrees[0] = edegrees[1] = 0;
284 if (edegrees[0] !=
graph->nrinfo[
i].edegrees[0] ||
285 edegrees[1] !=
graph->nrinfo[
i].edegrees[1]) {
287 i, edegrees[0], edegrees[1],
288 graph->nrinfo[
i].edegrees[0],
graph->nrinfo[
i].edegrees[1]);
294 if (pwgts[0] !=
graph->pwgts[0] ||
295 pwgts[1] !=
graph->pwgts[1] ||
296 pwgts[2] !=
graph->pwgts[2]) {
314 nvtxs =
graph->nvtxs;
319 for (
i=0;
i<nvtxs;
i++) {
341 idx_t i, ii,
j, k, kk,
l, nvtxs, nbnd, mincut, minvol, me,
other, pid;
343 vkrinfo_t *rinfo, *myrinfo, *orinfo, tmprinfo;
344 vnbr_t *mynbrs, *onbrs, *tmpnbrs;
348 nvtxs =
graph->nvtxs;
353 rinfo =
graph->vkrinfo;
360 for (
i=0;
i<nvtxs;
i++) {
366 for (k=0; k<myrinfo->
nnbrs; k++)
367 tmpnbrs[k] = mynbrs[k];
370 tmprinfo.
nid = myrinfo->
nid;
371 tmprinfo.
ned = myrinfo->
ned;
376 for (k=0; k<myrinfo->
nnbrs; k++)
387 for (k=0; k<myrinfo->
nnbrs; k++) {
389 for (kk=0; kk<orinfo->
nnbrs; kk++) {
390 if (onbrs[kk].pid == pid)
393 if (kk == orinfo->
nnbrs)
399 for (k=0; k<orinfo->
nnbrs; k++) {
400 if (onbrs[k].pid == me)
404 if (onbrs[k].ned == 1) {
405 for (k=0; k<myrinfo->
nnbrs; k++) {
406 if (mynbrs[k].pid ==
other) {
413 for (k=0; k<myrinfo->
nnbrs; k++) {
414 if ((pid = mynbrs[k].pid) ==
other)
416 for (kk=0; kk<orinfo->
nnbrs; kk++) {
417 if (onbrs[kk].pid == pid) {
427 for (k=0; k<myrinfo->
nnbrs; k++) {
428 if ((pid = mynbrs[k].pid) ==
other)
430 for (kk=0; kk<orinfo->
nnbrs; kk++) {
431 if (onbrs[kk].pid == pid)
434 if (kk == orinfo->
nnbrs)
444 for (k=0; k<myrinfo->
nnbrs; k++) {
446 for (kk=0; kk<tmprinfo.
nnbrs; kk++) {
447 if (tmpnbrs[kk].pid == pid) {
448 if (tmpnbrs[kk].gv != mynbrs[k].gv)
450 i,
where[
i], pid, mynbrs[k].gv, tmpnbrs[kk].gv);
idx_t ComputeCut(graph_t *graph, idx_t *where)
idx_t CheckBnd(graph_t *graph)
idx_t CheckNodePartitionParams(graph_t *graph)
idx_t CheckBnd2(graph_t *graph)
idx_t CheckNodeBnd(graph_t *graph, idx_t onbnd)
idx_t idx_t idx_t idx_t idx_t idx_t * adjwgt
void gk_free(void **ptr1,...)
idx_t idx_t idx_t idx_t idx_t * vsize
idx_t idx_t idx_t * adjncy
idx_t IsSeparable(graph_t *graph)
static const Similarity3 id
idx_t idx_t idx_t idx_t idx_t idx_t idx_t * nparts
idx_t ComputeMaxCut(graph_t *graph, idx_t nparts, idx_t *where)
static const Line3 l(Rot3(), 1, 1)
idx_t idx_t idx_t idx_t * vwgt
#define ASSERTP(expr, msg)
#define ASSERT(expression)
idx_t CheckRInfo(ctrl_t *ctrl, ckrinfo_t *rinfo)
idx_t ComputeVolume(graph_t *graph, idx_t *where)
idx_t idx_t idx_t idx_t * where
NonlinearFactorGraph graph
void CheckKWayVolPartitionParams(ctrl_t *ctrl, graph_t *graph)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:10