Chapter 14. BGL Classes
14.1 Graph Classes
14.1.1 adjacency_list
adjacency_list<EdgeList, VertexList, Directed, VertexProperties, EdgeProperties, GraphProperties>
The adjacency_list
class implements the BGL graph interface using several different variations on the traditional adjacency-list graph structure.
An adjacency-list reprepresentation of a graph stores an out-edge sequence for each vertex. For sparse graphs this saves space compared to an adjacency matrix because only O(|V| + |E|) memory is required, compared to O(|V|2). In addition, the out-edges for each vertex can be accessed efficiently. Figure 14.1 shows an adjacency-list representation of a directed graph.
Figure 14.1. Adjacency-list representation of a directed graph.
The ...
Get The Boost Graph Library: User Guide and Reference Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.