14 #include <boost/graph/adjacency_list.hpp>
15 #include <boost/graph/graph_traits.hpp>
16 #include <boost/graph/properties.hpp>
17 #include <boost/property_map/property_map.hpp>
20 typedef boost::graph_traits<
21 boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS>>::
67 using Graph =
typename boost::adjacency_list<boost::vecS,
75 typename boost::graph_traits<CP::Graph<T>>::vertex_descriptor;
78 typename boost::graph_traits<CP::Graph<T>>::vertices_size_type;
80 using EdgeIndex =
typename boost::graph_traits<CP::Graph<T>>::edges_size_type;
82 using VertexIterator =
typename boost::graph_traits<Graph<T>>::vertex_iterator;
84 using EdgeIterator =
typename boost::graph_traits<Graph<T>>::edge_iterator;
88 boost::vec_adj_list_vertex_property_map<Graph<T>,
92 boost::vertex_bundle_t>;
95 boost::adj_list_edge_property_map<boost::directed_tag,
100 boost::edge_bundle_t>;
101 template <
typename T>
103 typename boost::property_map<Graph<T>, boost::vertex_index_t>
::type;
104 template <
typename T>
106 typename boost::property_map<Graph<T>,
109 template <
typename T>
123 std::pair<EdgeDescriptor, bool> edge_added =
124 boost::add_edge(source, target, g);
125 if (edge_added.second) {
126 edge = edge_added.first;
127 edge_reverse = boost::add_edge(target, source, g).first;
132 edge_attribute_map(edge) = attrib_edge;
133 edge_attribute_map(edge_reverse) = attrib_edge_reverse;
typename boost::graph_traits< CP::Graph< T > >::vertices_size_type VertexIndex
bool addDoubledge(Graph< T > &g, const VertexDescriptor< T > &source, const VertexDescriptor< T > &target, const T weight, uint32_t eIndex, EdgeAttributeMap< T > &edge_attribute_map, bool real=true)
boost::vec_adj_list_vertex_property_map< Graph< T >, Graph< T > *, VertexAttribute< T >, VertexAttribute< T > &, boost::vertex_bundle_t > VertexAttributeMap
typename boost::graph_traits< Graph< T > >::edge_iterator EdgeIterator
typename boost::graph_traits< Graph< T > >::vertex_iterator VertexIterator
boost::graph_traits< boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS > >::edge_descriptor EdgeDescriptor
typename boost::property_map< Graph< T >, uint32_t EdgeAttribute< T >::* >::type EdgeIndexMap
typename boost::graph_traits< CP::Graph< T > >::vertex_descriptor VertexDescriptor
typename boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, VertexAttribute< T >, EdgeAttribute< T > > Graph
typename boost::property_map< Graph< T >, boost::vertex_index_t >::type VertexIndexMap
boost::adj_list_edge_property_map< boost::directed_tag, EdgeAttribute< T >, EdgeAttribute< T > &, uint64_t, CP::EdgeAttribute< T >, boost::edge_bundle_t > EdgeAttributeMap
EdgeAttribute(T weight=1., uint32_t eIndex=0, bool real=true)
EdgeDescriptor edge_reverse
std::vector< T > observation
VertexAttribute(uint32_t dim=1, T weight=1.)