/** * Warshall's algorithm for transitive closure computation. */ #include "warshall.h" #include "debug.h" void graph_fill (int *graph, int nodes, int value) { int node; node = 0; while (node < (nodes * nodes)) { graph[node] = value; node++; } } //! Show a graph void graph_display (int *graph, int nodes) { int i; int index (const int i, const int j) { return (i * nodes + j); } i = 0; while (i < nodes) { int j; j = 0; while (j < nodes) { eprintf ("%i ", graph[index (i, j)]); j++; } eprintf ("\n"); i++; } } //! Apply warshall's algorithm to determine the closure of a graph /** * If j