Boost logo

Boost Users :

Subject: Re: [Boost-users] write_graphviz requires not only VertexListGraph, but also EdgeListGraph
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2009-07-08 19:45:17


On Thu, 9 Jul 2009, Richard Ulrich wrote:

> Hi everybody,
>
> this is my first post to the boost mailing list.
>
> I'm using boost_1_39
>
> I wanted to use write_graphviz today with my custom graph adapter that
> implements VertexListGraph as well as IncidenceGraph.
> The documentation states, that write_graphviz only requires a
> VertexListGraph. But inside, it uses an edge_iterator, and calls
> edges(g), both of which belong to the EdgeListGraph.
>
> Am I right here, or did I miss something?

No, you got it right. It looks like this is a problem in the
documentation -- it appears that, like you said, EdgeListGraph is
required.

> If yes, should I implement a specialization that only calls out_edges()
> for every vertex, and thus a VertexListGraph would be sufficient?

That would still require IncidenceGraph, which is also not mentioned in
the documentation. Would it be hard for you to model EdgeListGraph? Do
you have memory space to just make an std::vector of your edges? That
would make the model trivial to write.

Could you please file a bug at svn.boost.org about the documentation
issue? It is a definite problem.

-- Jeremiah Willcock


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