[prev in list] [next in list] [prev in thread] [next in thread]
List: boost-users
Subject: Re: [Boost-users] [BGL] obtaining list of edges in a shortest path
From: Doug Gregor <dgregor () cs ! indiana ! edu>
Date: 2006-02-27 15:01:02
Message-ID: d6bfcda25907911a1f920b1f9c82b033 () cs ! indiana ! edu
[Download RAW message or body]
On Feb 26, 2006, at 7:19 PM, Lars S. Jessen wrote:
> As you can see, it's easy to obtain the list of vertices that makes the
> shortest path from start to goal, but how do I obtain the list of edges
> connecting start to goal?
Since you have the predecessor "u" for each vertex "v" in your
predecessor map, use the "edge(u, v, g)" function to retrieve the edge
from u to v. If your graph has parallel edges, search the out-edges of
u to find the edge (u, v) with smallest weight.
Doug
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic