+++ /dev/null
-#ifndef SCC_H
-#define SCC_H
-
-struct edge {
- void *from;
- void *to;
-};
-
-struct components {
- int nnodes;
- void **nodes;
- struct components *next;
-};
-
-#define FOREACHCOMP(x, l) for(struct components *x = l; x != NULL; x = x->next)
-
-/**
- * Calculate the strongly connected components using Tarjan's algorithm:
- * en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
- *
- * Returns NULL when there are invalid edges
- *
- * @param number of nodes
- * @param data of the nodes
- * @param number of edges
- * @param data of edges
- */
-struct components *tarjans(int nnodes, void *nodedata[], int nedges,
- struct edge *edgedata[], int *error);
-
-/**
- * Free a list of components
- *
- * @param cs components
- * @param freefun function to free the data with, if NULL, data isn't freed
- */
-void components_free(struct components *cs, void (*freefun)(void *));
-
-#endif