Changes between Version 1 and Version 2 of soc/2007/UserFriendlyGraphs/PropertyMaps


Ignore:
Timestamp:
Jul 3, 2007, 1:48:51 PM (15 years ago)
Author:
Andrew Sutton
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • soc/2007/UserFriendlyGraphs/PropertyMaps

    v1 v2  
    4343
    4444Because `vertex_descriptors` are integers (pretending to be their own indices), the property map simply returns the vertex's offset in the array given by the vector. While this works great, and is probably the best constant-time property access avaialble, it makes it really hard to figure out what's actually going on. In short, it has poor readability. Moreover, it's makes it kind of hard to figure out how to port this to graphs non-vector storage (like the `[un]directed_graph` classes). It's also somewhat fragile since it requires that vertex indices actually exist in the range [0, `num_vertices(g)`).
     45
     46== Explicit Implict Property Maps ==
     47Alot of the above property map stuff is hidden in the details. However, close inspection of the libraries shows a set of functions that are probably responsible for adapting that code to the property map interfaces. It's found in `properties.hpp`, and all functions have the name: `make_iterator_vertex_map` (with different parameters, of course). So, it might be a better idea to use these functions explicitly in the documentation. Calls could be of the form:
     48
     49{{{
     50#!cpp
     51vector<int> comps;
     52connected_components(g, make_container_vertex_map(comps));
     53}}}
     54
     55Or something like that... At least its a little more explicit. Also, it's kind of hard to see what type these maps are - which is why they're almost always passed as functions and typedef'd.
    4556
    4657== Truly Associative Property Maps ==