Boost logo

Boost Users :

From: Jeremy Siek (jeremy.siek_at_[hidden])
Date: 2005-09-19 09:15:18


Hi Giulio,

On Sep 19, 2005, at 7:42 AM, Giulio Veronesi wrote:
> Hi,
>
> I would like to locate an edge of a graph starting from the source and
> target vertex. For instance vertex(n, g) return the nth vertex of
> graph
> g. I would access the edge from vertex x to vertex y... something
> like this
>
> edge(x, y, g)
>

http://www.boost.org/libs/graph/doc/adjacency_list.html

std::pair<edge_descriptor, bool>
edge(vertex_descriptor u, vertex_descriptor v,
           const adjacency_list& g)

> Is there a fast way to do this?

The speed depends on the kind of adjacency_list
you are using and how sparse the graph is. The
BGL book might have the details on this... I'll
look when I get home.

Cheers,
Jeremy


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