Boost logo

Boost Users :

Subject: [Boost-users] [BGL] using subgraph and SCC in algorithm
From: Avishay Ben Shabtai (avishay.ben.shabtai_at_[hidden])
Date: 2011-10-17 04:07:48


hi

i am trying to figure out how is the best way to use the capabilities of
subgraph.
i am using the following declarations

typedef boost::adjacency_list<boost::listS
                                             ,boost::vecS ,boost::bidirectionalS //
    ,GVertexProp // ,CFGEdgeProp> // GBase;

typedef GBase::vertex_descriptor G_v_id;

class Graph : public GraphBase

{

public:

      remove(const std::string& vName){

           G_v_id vToRemove = findVertexByName(vName);

           boost::remove_vertex(vToRemove,*this);

     }

}

now my algorithm uses SCCs and works and modify each component
separately and the idea of subgraph charmed me so i performed the
following change

typedef boost::subgraph<boost::adjacency_list<boost::listS
                                             ,boost::vecS ,boost::bidirectionalS //
    ,GVertexProp // ,CFGEdgeProp> > // GBase;

typedef GBase::vertex_descriptor G_v_id;

and now it stops to compile on boost::remove_vertex.

is there an elegant way to use subgraph instead of copying it to
separate graph and working from there.



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