Lines Matching defs:gr
81 static int prid(Graph_t* gr, ssize_t id)
83 return prnode(grnode(gr, (void*)id, 0));
93 static int prgraph(Graph_t* gr)
96 for(nd = (Grnode_t*)dtflatten(gr->nodes); nd; nd = (Grnode_t*)dtlink(gr->nodes,nd) )
106 ssize_t grbranching(Graph_t* gr)
113 for(w = 0, n = (Grnode_t*)dtflatten(gr->nodes); n; w += 1, n = (Grnode_t*)dtlink(gr->nodes,n) )
137 for(n = (Grnode_t*)dtflatten(gr->nodes); n; n = (Grnode_t*)dtlink(gr->nodes,n) )
218 for(n = (Grnode_t*)dtflatten(gr->nodes); n; n = (Grnode_t*)dtlink(gr->nodes,n) )
247 for(n = (Grnode_t*)dtflatten(gr->nodes); n; n = (Grnode_t*)dtlink(gr->nodes,n) )
306 Graph_t *gr;
318 gr = gropen(0);
324 tn = grnode(gr, t, 1);
325 hn = grnode(gr, h, 1);
330 e = gredge(gr, tn, hn, 0, 1);
334 printf("\nTotal weight=%d\n", grbranching(gr));
335 for(n = (Grnode_t*)dtflatten(gr->nodes); n; n = (Grnode_t*)dtlink(gr->nodes, n) )