From 9be622f7703193cde9955b9663cea1259ac48efc Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 25 Jul 2018 18:14:55 -0400 Subject: trying some new c++ things, starting with graph --- lib/graph.h | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'lib/graph.h') diff --git a/lib/graph.h b/lib/graph.h index beb7f4c..a4732fb 100644 --- a/lib/graph.h +++ b/lib/graph.h @@ -2,27 +2,20 @@ #pragma once #include -#include +#include #include +#include #include "types.h" -#ifdef __cplusplus -extern "C" { -#endif +class graph_t { + public: + v_t ne; + v_t nv; + std::vector> v_adj; -typedef struct { - v_t ne; - v_t nv; - v_t *v_i; - v_t *v_adj; -} graph_t; + graph_t(D_t D, L_t L); + void add_ext(); -graph_t *graph_create_square(D_t D, L_t L); -graph_t *graph_add_ext(const graph_t *G); -void graph_free(graph_t *h); - -#ifdef __cplusplus -} -#endif +}; -- cgit v1.2.3-70-g09d2