Boost logo

Boost Users :

From: David A. Greene (greened_at_[hidden])
Date: 2007-06-05 13:48:52


On Monday 04 June 2007 21:06, Aaron Windsor wrote:

> The error you're seeing (both in your code and the example you
> included) is caused because the topological sort algorithm expects a
> vertex index map - if you don't provide one as a parameter, it uses
> whatever interior vertex index map the graph has. Even if you declare
> a vertex index map as an interior property of the graph, you still
> have to initialize it by mapping each vertex to an integer in the
> range 0..num_vertices(g)-1. See #5 in the BGL FAQ
> (http://www.boost.org/libs/graph/doc/faq.html) for an example of how
> to initialize one.

Ok, that makes sense.

How do I add a vertex index map property to a graph that already has
bundled properties? The FAQ example assumes property lists.

Or do I need to use an external property?

Thanks again for your help.

                                            -Dave


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