Started by **Peter Daniels**Sep 28, 2021

Closed

On Converting Existing Graphs to BGLI 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.

Thank you for your kind feedback.

Trending Technologies

15

Software40

DevOps48

Frontend Development24

Backend Development20

Server Administration17

Linux Administration26

Data Center24

Sentry24

Terraform23

Ansible83

Docker70

Penetration Testing16

Kubernetes21

NGINX20

JenkinsX17

Recommended Blogs

8

Recommended Threads

8

Anik Adhikary

Anik Adhikary

Anik Adhikary