|
Boost Users : |
Subject: Re: [Boost-users] Boost Graph - Get the vertex based on the
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-06-23 08:26:48
On Wed, 23 Jun 2010, Muthuveerappan Alagappan wrote:
> Hi,
>
> I am a newbie to boost graph library (BGL).
>
> 1) To build a graph with vertices with unique ids - Able to do this
> 2) To get the vertex containing a specific idsI have created a graph with vertices that have a custom property. - how can I do this ?
>
> The way I have tried to do is to iterate through all the vertices and checked each vertex's property value. Is there a better way to do
> this ?
>
> Note - This field is a unique Id field
>
> Can it be indexed based on the unique id, so that it can be accessed directly ?
There is no BGL way to do this; you should probably use an external map or
unordered_map (or Boost.MultiIndex) for the lookups.
-- Jeremiah Willcock
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