I am using adjacency_list and subgraph adapter to create my graph type.
#include <boost/graph/subgraph.hpp>
#include <boost/graph/adjacency_list.hpp>
struct VertexProperties
{
bool bIsExpandable;
string sId;
string sCoord_X;
string sCoord_Y;
std::size_t order;
};
struct EdgeProperties
{
string sId;
bool bBidirectional;
};
//Graph properties
enum graph_index_t {graph_index=111};
namespace boost{
BOOST_INSTALL_PROPERTY(graph,index);
}
typedef boost::property<boost::vertex_index_t, std::size_t , VertexProperties> vertex_prop;
typedef boost::property<boost::edge_index_t, std::size_t , EdgeProperties> edge_prop;
typedef boost::property<graph_index_t, std::size_t> graph_prop;
typedef boost::adjacency_list<
boost::listS,
boost::vecS,
boost::bidirectionalS,
vertex_prop ,
edge_prop,
graph_prop>
Graph;
typedef boost::subgraph<Graph> Subgraph;
I am using bundled properties for vertices and edges. I have tried giving bundled property to 'graph', for adjacency_list it works fine but could not be used for subgraph adapter, I have found that it is not supported by boost subgraph adapter. So I added graph_index_t to graph properties, but I am not able to access it. I have written following property map to access it, but it seems that it not the correct way.
typedef property_map<Subgraph , graph_index_t>::type GraphIndexPropertyMap;
It gives error in adjacency_list.hpp
d:\boost_1_53_0\boost\graph\detail\adjacency_list.hpp:2543: error: forming reference to void
I have checked boost 1.53 documentation but could not find the way related to this.
So I have 2 Questions:
1) How to get read-write access to the graph_index property?
2) Can I use bundled property for 'graph' with boost subgraph in some way?
Can anyone help?
Thanks,
Pratik