diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-07 04:05:07 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-07 04:05:07 +0000 |
| commit | 1eb5e8dcd17d84959a46a2d837ae719fc8eb3516 (patch) | |
| tree | fb78e60a3278d4727ecf74874698cb21275ee0e9 /lib/graph.h | |
| parent | 7a6ded40965d341456cdd5882c61ca4e22913c2b (diff) | |
lib: Continue matching system refactor
Most things back to working, all CLI units refactored
to use improved graph implementation.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/graph.h')
| -rw-r--r-- | lib/graph.h | 15 |
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. * |
