I tried to follow the guidelines concerning the implementation of the graph traits for accessing the vertex/edge data, as well as defining iterators for scanning the graph, but this tutorial lacks the description concerning the property maps that are declared in this other full implementation. In other words, which are precisely the property maps as outlined here that guarantee me that I could run all the algorithms from the Boost Graph Library?
1 Replies
That's asking the wrong question. One of the key design choices of the BGL (much like the STL) is the separation of data structures and algorithms. The set of properties required by the algorithm varies by the algorithm (and even by the usage of the same algorithm) and can be satisfied in many ways generically.
Which property map(s) are required is documented with the algorithm. This, by the way, is in addition to which concept the graph model must satisfy.
I do know that the documentation can be slightly out of date¹ and more specifically, life with c++14+ can be significantly easier than in the documentation examples.
In case it helps, here are "modern" examples on adapting your own data structures for use with BGL:
What is needed to use BGL algorithms on existing data structures ( edges and vertices as vector<Object *>)?
Interestingly, someone later ran into precisely your question about additional requirements for a specific algorithm. In this answer: What is required for a custom BGL graph to work with topological sort? I show not only how to figure out what requirements have to be satisfied but also how to achieve that.