Changes between Version 13 and Version 14 of soc/2007/UserFriendlyGraph


Ignore:
Timestamp:
Jun 25, 2007, 12:45:38 AM (15 years ago)
Author:
Andrew Sutton
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • soc/2007/UserFriendlyGraph

    v13 v14  
    1414This is basically something to take the place of a developer's Journal.
    1515
    16 === Vertex and Edge Indices ===
    17 Since switching the default storage selectors from `vecS` to `listS`, I've noticed exactly how few examples there are that actually use this. What's actually troubling about this is the fact that `vecS` secretly provides a `vertex_index` property which, as far as I can tell is used by nearly every algorithm in the library. Not surprisingly, `listS` does not. This can cause a number of misconceptions, namely this [http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Documentation_-_Graph_Library using vertex_descriptor as a 0-based index] post on the Boost wiki.
    18 
    19 (Jeremy: yes, this is a serious problem that should be addressed in the new graph classes.)
    20 
    21 Anyhow, the problem is not that using `listS` as a storage selector really breaks a lot of code (it can), but that its hard to figure out how to create vertex and edge index maps for them. The Dijkstra example has a `listS` example, but it uses property maps instead of bundled properties. Apparently, the solution is to manually initialize the index map. This is both good and bad. First, it's bad because new user's won't really understand why they have to write the same chunk of code over and over. Maybe it would be nice to provide a default `index_vertices()` function and an `index_edges()` functions that do that work for us. On the other hand, It's good because it highlights the instability of indices over descriptors.
    22 
    23 (Jeremy: I'd suggest going even further, and have the graph class automatically create and maintain indices for the vertices and edges.)
    24 
    25 I think the real I'm having with this is that so much of the documentation and so many of the examples operate on the notion that a `vertex_descriptor` is its own index - which it is most definitely not.
    26 
    27 (Jeremy: yes, that is correct.)
     16 * [wiki:soc/2007/UserFriendlyGraphs/Indexing Vertex Indexing] - Discusses some approaches to automated vertex indexing and index managements.