btllib: include/btllib/graph.hpp Source File

btllib

Loading...
Searching...
No Matches
graph.hpp
1// #ifndef BTLLIB_GRAPH_HPP
2// #define BTLLIB_GRAPH_HPP
3
4// #include <boost/graph/adjacency_list.hpp>
5// #include <boost/graph/graphviz.hpp>
6
7// #include <iostream>
8// #include <sstream>
9// #include <string>
10
11// namespace btllib {
12
13// class Graph;
14
15// class Vertex
16// {
17
18// public:
19// private:
20// friend class Graph;
21
22// Vertex(long id)
23// : id(id)
24// {}
25
26// long id;
27// };
28
29// class Edge
30// {
31
32// public:
33// private:
34// friend class Graph;
35
36// Edge(Vertex u, Vertex v)
37// : u(u)
38// , v(v)
39// {}
40
41// Vertex u, v;
42// };
43
44// class Graph
45// {
46
47// public:
48// Graph() {}
49
50// Vertex add_vertex();
51// void remove_vertex(Vertex v);
52
53// Edge add_edge(Vertex u, Vertex v);
54// void remove_edge(Edge e);
55
56// std::string to_string();
57
58// private:
59// boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS>
60// graph;
61// };
62
63// inline Vertex
64// Graph::add_vertex()
65// {
66// return boost::add_vertex(graph);
67// }
68
69// inline void
70// Graph::remove_vertex(Vertex v)
71// {}
72
73// inline Edge
74// Graph::add_edge(Vertex u, Vertex v)
75// {
76// boost::add_edge(u.id, v.id, graph);
77// return Edge(u, v);
78// }
79
80// inline void
81// Graph::remove_edge(Edge e)
82// {
83// boost::remove_edge(e.u.id, e.v.id, graph);
84// }
85
86// inline std::string
87// Graph::to_string()
88// {
89// std::stringstream ss;
90// boost::write_graphviz(ss, graph);
91// return ss.str();
92// }
93
94// } // namespace btllib
95
96// #endif