Home | History | Annotate | Download | only in tsort

Lines Matching defs:graph

89 	NODE *n_next;			/* next node in graph */
104 static NODE *graph, **cycle_buf, **longest_cycle;
163 /* parse input and build the graph */
200 * add an arc from node s1 to node s2 in the graph. If s1 or s2 are not in
201 * the graph, then add them.
237 /* Find a node in the graph (insert if not found) and return a pointer to it. */
272 if ((n->n_next = graph) != NULL)
273 graph->n_prevp = &n->n_next;
274 n->n_prevp = &graph;
275 graph = n;
294 for (n = graph; n != NULL; n = n->n_next)
298 /* do topological sort on graph */
305 while (graph != NULL) {
308 * if there are any nodes still in the graph, then there is
312 for (cnt = 0, n = graph; n != NULL; n = next) {
319 } while (graph != NULL && cnt);
321 if (graph == NULL)
330 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