00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef ESTAR_BASE_HPP
00022 #define ESTAR_BASE_HPP
00023
00024
00025 #include <estar/numeric.hpp>
00026 #include <boost/graph/adjacency_list.hpp>
00027
00028
00029 namespace estar {
00030
00031
00036 typedef enum {
00038 NONE,
00040 OPEN,
00042 GOAL,
00044 OPNG
00045 } flag_t;
00046
00047
00052 const char * flag_name(flag_t p);
00053
00054
00056
00057
00059 typedef boost::vecS cspace_OutEdgeListS;
00060
00062 typedef boost::vecS cspace_VertexListS;
00063
00065 typedef boost::undirectedS cspace_DirectedS;
00066
00068 typedef boost::adjacency_list_traits<cspace_OutEdgeListS,
00069 cspace_VertexListS,
00070 cspace_DirectedS> cspace_traits;
00071
00073 typedef cspace_traits::vertex_descriptor vertex_t;
00074
00075
00077
00078
00080 struct value_p { typedef boost::vertex_property_tag kind; };
00081
00083 struct meta_p { typedef boost::vertex_property_tag kind; };
00084
00086 struct rhs_p { typedef boost::vertex_property_tag kind; };
00087
00089 struct flag_p { typedef boost::vertex_property_tag kind; };
00090
00091
00093
00094
00096 typedef boost::property<value_p, double,
00097 boost::property<meta_p, double,
00098 boost::property<rhs_p, double,
00099 boost::property<flag_p, flag_t
00100 > > > > cspace_vertex_property;
00101
00103 typedef boost::adjacency_list<cspace_OutEdgeListS,
00104 cspace_VertexListS,
00105 cspace_DirectedS,
00106 cspace_vertex_property> cspace_t;
00107
00109 typedef boost::graph_traits<cspace_t>::adjacency_iterator adjacency_it;
00110
00112 typedef boost::graph_traits<cspace_t>::vertex_iterator vertex_it;
00113
00114
00116
00117
00119 typedef
00120 boost::property_map<cspace_t, boost::vertex_index_t>::type vertexid_map_t;
00121
00123 typedef boost::property_map<cspace_t, value_p>::type value_map_t;
00124
00126 typedef boost::property_map<cspace_t, meta_p>::type meta_map_t;
00127
00129 typedef boost::property_map<cspace_t, rhs_p>::type rhs_map_t;
00130
00132 typedef boost::property_map<cspace_t, flag_p>::type flag_map_t;
00133
00134 }
00135
00136 #endif // ESTAR_BASE_HPP