write_graphviz requires not only VertexListGraph, but also EdgeListGraph

View: New views
3 Messages — Rating Filter:   Alert me  

write_graphviz requires not only VertexListGraph, but also EdgeListGraph

by Richard Ulrich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

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

With kind regards
Richard

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: write_graphviz requires not only VertexListGraph, but also EdgeListGraph

by Jeremiah Willcock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: write_graphviz requires not only VertexListGraph, but also EdgeListGraph

by Andrey Torba :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had the similar problem:

the documentation needs to be updated

--
Regards, Andrey

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users