Boost logo

Boost Users :

Subject: [Boost-users] [BGL] problem using subgraph
From: Avishay Ben Shabtai (avishay.ben.shabtai_at_[hidden])
Date: 2011-10-18 13:04:35


Hey

i am trying to use subgraph but i am having troubles one of them is the
following scenario

typedef adjacency_list_traits< vecS, vecS, directedS > Traits;
typedef subgraph< adjacency_list< vecS, vecS, directedS,
  no_property, property< edge_index_t, int > > > Graph;

Graph G0(6);

boost::add_edge(0,1,G0);

Graph G1 = G0.create_subgraph();

boost::add_vertex(0,G1);

boost::add_vertex(1,G1);

boost::remove_edge(boost::edge(0,1,G1).first,G1);

My Analysis is that since the edge is added to G0 before creation of
G1 it does not add the edge (0,1) to its m_local_edge

is there a way to overcome it? or i need to create all my subgraphs upfront

Thanks



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net