Boost logo

Boost Users :

Subject: [Boost-users] Newbie: Boost Graph example request
From: Brian Troutwine (goofyheadedpunk_at_[hidden])
Date: 2009-10-03 22:31:00


Hello all.

I'm new to using the Boost Graph library and am bewildered by its
(seemingly essential) complexity. A solution to the simplistic problem
I pose below would help provide a workable context around which to
wrap my brain and would be most appreciated.

--
Let G be the undirected graph given by the following adjacency list:
0 -> 2, 3
1 -> 2, 4
2 -> 3, 4
3 -> 1
4 -> 3
5 -> 0
6 -> 7
7 -> 8, 9
9 -> 10
Using, say, a breadth first search, for any two random nodes in the
graph print the shortest path between them. For example, the shortest
path between 5 and 3 is:
5 -> 0 -> 3
My apologies if a similar question has been asked before. A search
through the mailing list archive did not return promising results.
Also, I have, incidentally, ordered The Boost Graph Library text and
am very much looking forward to its arrival.
Thank you.
Brian Troutwine

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net