Boost logo

Boost Users :

From: kweeheong (tan.k.h_at_[hidden])
Date: 2002-10-26 17:08:56


Hi,

For convenience, I am using Graphviz digraphs, reading them into BGL, running my algorithms and writing them out to view the results (with Graphviz dotty ).

My compiling environment is VC6.

After some compilation failures, I realized that Graphviz digraphs did not support in_edges and other functionality of the bidirectional graphs. Graphviz digraphs is currently defined in graphviz.hpp as :
  typedef subgraph<adjacency_list<boost::vecS, boost::vecS, boost::directedS, GraphvizVertexProperty, GraphvizEdgeProperty, GraphvizGraphProperty> > GraphvizDigraph;

There are 2 potential solutions I see ( there may be others ):

Solution 1 :
------------
   - Read in Graphviz digraph and then copy it into a working bidirectional graph to run the algorithms.
   - Copy back to Graphviz digraph to view the results.

Solution 2 :
------------
   - Change the definition of GraphvizDigraph to :
  typedef subgraph<adjacency_list<boost::vecS, boost::vecS, boost::bidirectonalS, GraphvizVertexProperty, GraphvizEdgeProperty, GraphvizGraphProperty> > GraphvizDigraph;
   - Recompile bglviz.lib
   - Now GraphvizDigraph is bidirectional

I prefer Solution 2 because it leverages the generic way that BGL has been written. I am able to rebuild bglviz.lib and my minimal testing shows the bidrectional GraphvizDigraph seems to work so far.

I would like feedback whether there are any gotchas with Solution 2.

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