C++ Reference Material
The Boost Graph Library
The Boost Graph Library takes a little getting used to, to say the least. We discuss here, briefly, some of the concepts with which you must become familiar in order to make sense of the various code samples that are available. [See references below.] The best way to proceed, before trying to write any code of your own, is to study the source and output of any examples you can find, while reading and re-reading the descriptions of the various structures and algorithms involved. Prior experience with the C++ Standard Template Library (STL) will be very helpful when it comes to working with the Boost Graph Library.
If you are reading this page, you should already be familiar with much of the usual graph terminology, including vertex (or node), edge (or arc), weighted and unweighted graphs, paths and cycles in graphs, neighbors (adjacent vertices), directed and undirected graphs, connected and unconnected (or disconnected or disjoint) graphs, strong and weak connectivity in directed graphs, sparse and dense graphs, as well as the degree, in-degree and/or out-degree of a vertex. Other key concepts include graph traversals, (minimal) spanning trees, and shortest paths, as well as the adjacency list and adjacency matrix methods of representing graphs. Also, the DAG (directed, acyclic (or non-cyclic) graph) is one special kind of graph of particular interest, and the notion of the transitive closure of a directed graph is a concept of interest as well.
The kinds of problem structures that can be modeled with a graph are very diverse. Here are a few examples:
adjacency_list<> adjacency_list<vecS, > adjacency_matrix<>