diff --git a/src/warshall.c b/src/warshall.c index 3bf6ca1..6f189fc 100644 --- a/src/warshall.c +++ b/src/warshall.c @@ -16,42 +16,76 @@ graph_fill (int *graph, int nodes, int value) } } -/** - * return 1 if no cycle - * return 0 if cycle - */ -int -warshall (int *graph, int size) +//! Show a graph +void graph_display (int *graph, int nodes) { int i; - int index2 (i, j) + int index (const int i, const int j) { - return (i * size + j); + return (i * nodes + j); } i = 0; - while (i < size) + while (i < nodes) + { + int j; + j = 0; + while (j