summaryrefslogtreecommitdiff
path: root/lib/graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/graph.h')
-rw-r--r--lib/graph.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/graph.h b/lib/graph.h
index 7c0f848001..bccbbb94a0 100644
--- a/lib/graph.h
+++ b/lib/graph.h
@@ -27,26 +27,23 @@
#include "vector.h"
-/**
- * Graph structure.
- */
struct graph
{
- vector nodes; // all nodes in the graph
-}
+ vector nodes;
+};
-/**
- * Graph node / vertex.
- */
struct graph_node
{
vector from; // nodes which have edges to this node
vector to; // nodes which this node has edges to
void *data; // node data
- void (*del) (void *data) // deletion callback
+ void (*del) (void *data); // deletion callback
};
+struct graph *
+graph_new (void);
+
/**
* Creates a new node.
*