Boost logo

Boost Users :

Subject: Re: [Boost-users] dijkstra-example.cpp
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2012-01-27 16:17:57

On Fri, 27 Jan 2012, fergie wrote:

> I’ve been reviewing the dijkstra-example.cpp that is provided as part of
> boost Graph. I think I understand most of it and have been able to
> demonstrate the application working to my boss. I have one question about
> the code. When output the .dot file near the end of the program the results
> are shaded either grey or black. What is the significance of the black and
> grey lines?

Black lines are edges in the single-source shortest path tree, while gray
lines are edges that are not in the tree. Look at for exactly what
the tree represents.

> I’ve looked through the documentation and am also confused
> about the source and the target since we have an iterator going through the
> entire graph. What defines a source and target vertex?

The graph is directed, so each edge goes from a defined source to a
defined target. The arrows in the output file show the directions of the

-- Jeremiah Willcock

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at