libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
BGL_Graph.hpp
1 /*
2  * BGL_Graph.hpp
3  * BioMove3D
4  *
5  * Created by Jim Mainprice on 15/07/10.
6  * Copyright 2010 LAAS/CNRS. All rights reserved.
7  *
8  */
9 #ifndef BGL_GRAPH_HPP
10 #define BGL_GRAPH_HPP
11 
12 #include <iostream> // for std::cout
13 #include <utility> // for std::pair
14 #include <algorithm> // for std::for_each
15 #include <boost/graph/graph_traits.hpp>
16 #include <boost/graph/adjacency_list.hpp>
17 #include <boost/graph/properties.hpp>
18 #include <boost/graph/dijkstra_shortest_paths.hpp>
19 
20 //----------------------------------------------------------------------
21 // Node and Edge data
22 
23 struct NodeData_t {
24  typedef boost::vertex_property_tag kind;
25 };
26 
27 struct EdgeData_t {
28  typedef boost::edge_property_tag kind;
29 };
30 
31 class Node;
32 class Edge;
33 
34 typedef boost::adjacency_list_traits<boost::listS, boost::vecS, boost::bidirectionalS>::vertex_descriptor vertex_descriptor;
35 
36 //typedef VertexProperty;
37 //typedef EdgeProperty;
38 
39 typedef boost::adjacency_list<
40 boost::listS, // The container used for egdes : here, std::list.
41 boost::vecS, // The container used for vertices: here, std::vector.
42 boost::bidirectionalS, // directed or undirected edges ?.
43 
44 boost::property<NodeData_t, Node*,
45 boost::property<boost::vertex_distance_t, double,
46 boost::property<boost::vertex_predecessor_t, vertex_descriptor> > >, // The type that describes a Vertex
47 
48 boost::property<EdgeData_t, Edge*,
49 boost::property<boost::edge_weight_t, double> > // The type that describes en Edge
50 > BGL_Graph;
51 
53 typedef boost::graph_traits<BGL_Graph>::vertex_descriptor BGL_Vertex;
54 
56 typedef boost::graph_traits<BGL_Graph>::edge_descriptor BGL_Edge;
57 
59 typedef boost::property_map<BGL_Graph, NodeData_t>::type BGL_VertexDataMapT;
60 
62 typedef boost::property_map<BGL_Graph, EdgeData_t>::type BGL_EdgeDataMapT;
63 
64 #endif
Classe représentant un Node d'un Graph.
Definition: node.hpp:39
Classe représentant une Edge d'un Graph.
Definition: edge.hpp:24
Definition: BGL_Graph.hpp:27
Definition: BGL_Graph.hpp:23