Boost logo

Boost Users :

Subject: [Boost-users] Confused with BGL-- Six Degrees of Kevin Bacon example
From: lizy10b (lizy10b_at_[hidden])
Date: 2013-05-29 09:46:15


Hi there,
  I am new to BGL library.
  I am walking through the online tutorial and just finished the "10.2. Six Degrees of Kevin Bacon".
  
  As it is said at the end of the example: "Note that vertex descriptor objects can not always be used as
indices into vectors or arrays such as bacon_number. This is valid with the
adjacency_list class with VertexList=vecS, but not with other variations of
adjacency_list. A more generic way to index based on vertices is to use the
ID property map (vertex_index_t) in coordination with the iterator_property_map.".
  
  So I turn to have a look at the iterator_property_map page and its sample.
First, this sample uses VertexList=vecS too.
Second, I know this sample is using iterator_property_map to build a property map,
but I think the property is still indexed by the edge descriptor objects.
 So what is the difference?

Thanks.

Zhiyu LI

2013-05-29

lizy10b



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