-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Jeremy,
thanks for your quick reply.
What I do is the following: I wrote my own class representing nodes (class
myNodeClass). Now I'm creating nodes in a graph, mapping each resulting
vertex index to the associated myNode-object in a std::map. I hope the
following code fragment is enough to give you an idea:
class myNodeClass;
typedef boost::adjacency_list
Hi Michael,
You can't add your own vertex_index property to an adjacency_list with VertexList=vecS. The adjacency_list will just ignore it if you do. You can if VertexList=listS, and example/adjacency_list.cpp is an example of this.
Also, you can add properties with names other than vertex_index_t to adjacency_list with VertexList=vecS. For example, you could add your own vertex_id_t property. However, this would *not* keep the vertex descriptors from being invalidated, it would just give you a vertex_id_t property that is stable.
I'm not sure if the above helps... I don't know the details of what you are trying to do, but feel free to ask further questions.
Cheers, Jeremy
On Fri, 12 Jul 2002, Michael Kettner wrote: kettne> Hi, kettne> kettne> can someone give an example how to "not use the built-in vertex index, and kettne> instead use a property to add my own vertex index property" (see page 223 kettne> BGL-book) for an adjacency_list? kettne> My problem is that I'm using the vecS selector for the VertexList template kettne> parameter and I need to remove vertices from my graph (but not frequently). kettne> Every time I do this, my vertex descriptors are invalidated (as described in kettne> the book). I need a solution so that I can remove some vertices and all my kettne> vertex descriptors remain valid. kettne> kettne> Thanks in advance, kettne> kettne> Michael -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE9LxOVkCdGnb0kVFMRAsIjAJ9CJGpmbc6lpuoEhGgeznxdUunndwCfRnh4 wbjiVESZ3HwVrNkhJ4Gvf48= =0S8n -----END PGP SIGNATURE-----