Lines Matching defs:graph
85 NODE *n_next; /* next node in graph */
100 NODE *graph, **cycle_buf, **longest_cycle;
155 /* parse input and build the graph */
197 * add an arc from node s1 to node s2 in the graph. If s1 or s2 are not in
198 * the graph, then add them.
234 /* Find a node in the graph (insert if not found) and return a pointer to it. */
270 if ((n->n_next = graph) != NULL)
271 graph->n_prevp = &n->n_next;
272 n->n_prevp = &graph;
273 graph = n;
292 for (n = graph; n != NULL; n = n->n_next)
296 /* do topological sort on graph */
303 while (graph != NULL) {
306 * if there are any nodes still in the graph, then there is
310 for (cnt = 0, n = graph; n != NULL; n = next) {
317 } while (graph != NULL && cnt);
319 if (graph == NULL)
328 for (cnt = 0, n = graph; n != NULL; n = n->n_next)
335 for (n = graph; n != NULL; n = n->n_next)
359 /* print node and remove from graph (does not actually free node) */
384 * avoid infinite loops and ignore portions of the graph known