Hi,
I am using following declaration to define subgraphs over undirected
graph such that parallel edges are disallowed:
typedef boost::adjacency_list, property >
ImplGraph_t;
typedef boost::subgraph embeddedGraph_t;
that is use setS for EdgeList instead of listS.
However when I call the function local_to_global over the subgraph i
end up following errors:
/home/sandeep/Computing/boost_1_38_0/boost/graph/subgraph.hpp:147:
error: passing ‘const std::vector >’ as
‘this’ argument of ‘typename std::_Vector_base<_Tp,
_Alloc>::_Tp_alloc_type::reference std::vector<_Tp,
_Alloc>::operator[](size_t) [with _Tp = void*, _Alloc =
std::allocator]’ discards qualifiers
/home/sandeep/Computing/boost_1_38_0/boost/graph/subgraph.hpp:147:
error: invalid conversion from ‘void*’ to ‘unsigned int’
/home/sandeep/Computing/boost_1_38_0/boost/graph/subgraph.hpp:147:
error: initializing argument 1 of ‘typename std::_Vector_base<_Tp,
_Alloc>::_Tp_alloc_type::reference std::vector<_Tp,
_Alloc>::operator[](size_t) [with _Tp = void*, _Alloc =
std::allocator]’
Please find the full code that creates the above scenario. Appreciate any help.
-Thanks
sandeep
///////////////-----------------------Undirected_Subgraph.cpp-----------------------------
#include
#include
using namespace boost;
typedef boost::adjacency_list, property >
ImplGraph_t;
typedef boost::subgraph embeddedGraph_t;
int main()
{
embeddedGraph_t G;
typedef graph_traits::vertex_descriptor vertex_t;
vertex_t v;
embeddedGraph_t& G1 = G.create_subgraph();
G.local_to_global(v);
return 0;
}