Boost logo

Boost Users :

Subject: Re: [Boost-users] BGL - accessing component subgraphs.
From: Adam Spargo (aws_at_[hidden])
Date: 2010-07-15 05:06:26

Yes, thanks, I'm trying to implement filtered_graph now, I found it after
a little more poking around, seems ideal.

I might need some help with my filter function, but I'll try a bit harder


Dr Adam Spargo
High Performance Assembly Group   email: aws_at_[hidden]
Wellcome Trust Sanger Institute   Tel: +44 (0)1223 834244 x7728
Hinxton, Cambridge CB10 1SA       Fax: +44 (0)1223 494919
On Wed, 14 Jul 2010, Jeremiah Willcock wrote:
> On Wed, 14 Jul 2010, Adam Spargo wrote:
>> Any tips on the best way to access a subgraph - ideally without the memory 
>> overhead of copying the subgraph to a new object.
>> I want to pass each component of my graph to an algorithm separately, but 
>> in some cases the original graph will only have a single or a few 
>> component(s), in other cases there will be many.
>> Maybe I will do it differently depending on how many components I have.
>> Any tips welcome.
> There is a subgraph class in BGL, and also filtered_graph.  Are the subgraphs 
> you're working with induced subgraphs (i.e., you do not selectively remove 
> edges other than by filtering out their endpoints)? The subgraph class seems 
> to make the subgraphs look more like normal graphs, while filtered_graph is 
> probably much simpler (it doesn't update num_vertices() to match the subgraph 
> size, for example).  If you're passing in something like the connected 
> components of a graph individually, that is an induced subgraph and so either 
> of those classes will work directly.
> -- Jeremiah Willcock
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

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