[graph] VertexList type boost::vecS and boost::listS

Hi,
I have some Questions concerning the Boost Graph Library graph template
selector VertexList type. In the docs at
http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/using_adjacency_list.htm...
I just found the two types documented.
1. How do i use the printed_graph (...) with a graph type that uses
boost::listS instead of boost::vecS?
I read that by using boost::vecS there is automatically an internal
property for each Vertex created, which is the index of the vertex. I
assume this is the reason why 'add_edge (1,2,g);' and
'print_graph (g,get(boost::vertex_index, g));' work for a graph g with a
boost::vecS VertexList.
However i cannot simply do 'add_edge (1,2,g);' or 'print_graph
(g,get(boost::vertex_index, g));' vor a graph g with a VertexList type
listS.
How do i specify a vertex_index property for VertexList listS graph
type, so that i can somehow use print_graph (g,something);?
How are vertices internally identified when using listS? Are there any
documentations about the function 'vertex()'? I think it is missing in
Table 1: Summary of boost graph concepts in
http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/graph_concepts.html
Look at the difference in using add_edge for the two different graph
types and what happens if i try to insert an edge with one vertex not
yet being part of the vertex set.
Here is an example:
//begin code
#include <iostream>
#include

On Fri, 2011-10-14 at 15:27 +0200, Christoph wrote:
Hi,
I have some Questions concerning the Boost Graph Library graph template selector VertexList type. In the docs at http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/using_adjacency_list.htm... I just found the two types documented.
1. How do i use the printed_graph (...) with a graph type that uses boost::listS instead of boost::vecS?
[snip] The answer is in the FAQ: 5. Why does the algorithm X work with adjacency_list where VertexList=vecS but not when VertexList=listS? http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/faq.html best regards Christoph
participants (1)
-
Christoph