Making programs that manipulate graphs was never easy because of issues with visualization. When we work with standard library containers such as std::map
and std::vector
, we can always print the container's contents and see what is going on inside. But when we work with complex graphs, it is hard to visualize the content in a clear way; textual representation is not human friendly because it typically contains too many vertexes and edges.
In this recipe, we'll take a look at the visualization of Boost.Graph
using the Graphviz tool.
To visualize graphs, you will need a Graphviz visualization tool. Knowledge of the preceding recipe is also required.
Visualization is done in two phases. In the first phase, we make our program output the graph's description in a text format suitable for Graphviz. In the second phase, we import the output from the first step to the visualization tool. The numbered steps in this recipe are all about the first phase...