Boost logo

Boost Users :

Subject: Re: [Boost-users] [GRAPH]write_graphviz and setS edges
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-08-18 07:35:34


>
> I'd like to use the simple write_graphviz function
> write_graphviz(std::cout,g);
>
> but since my graph doesn't allow multiple edges between two vertices, the
> graph type is defined by :
> typedef adjacency_list <listS,setS, directedS,...>Graph;
>
> but then I can't use the write_graphviz function anymore (compilation
> error). If I declare my graph with
> typedef adjacency_list <listS,vecS, directedS,...>Graph;
> it is fine, but have multiple edges...
>
> So my question is : is there a way to use write_graphviz with the setS
> edges representation ?
>

I am not terribly familiar with the write_graphviz interface, so this may
not be too helpful. I believe the problem is the manner in which setS and
vecS identify vertices (descriptors) in the graph data structure. You may
need to provide a vertex index map when you call write_graphviz, possibly
using dynamic_properties. Unfortunately, I don't have any examples to point
at. Perhaps other users will have encountered and solved the same problem.

Andrew Sutton
andrew.n.sutton_at_[hidden]



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