Chapter 10. Interfacing with Other Graph Libraries

Although the main goal of BGL is to aid the development of new applications and graph algorithms, there are quite a few existing codes that can benefit from using BGL algorithms. One way to use the BGL algorithms with existing graph data structures is to copy data from the older graph format into a BGL graph, which is then used with the BGL algorithms. The problem with this approach is that it can be inconvenient and expensive to perform this copy. Another approach is to use the existing data structure directly by wrapping it with a BGL interface.

The Adaptor pattern [14] is one mechanism for providing a new interface to an existing class. This approach typically requires that the adapted object ...

Get The Boost Graph Library: User Guide and Reference Manual now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.