|
Boost Users : |
From: Boris Lau (lau_at_[hidden])
Date: 2008-02-21 11:34:28
Hello,
I'm new to boost and a bit confused about how to choose the vertex list
type. My graph has around 50.000, and will be pruned down to roughly
500, so I use clear_vertex and remove_vertex a lot. According to
http://www.boost.org/libs/graph/doc/adjacency_list.html,
this works well only with VL=listS, otherwise I cannot safely remove
vertices. Is that true?
Ok, let's assume for now I need to use VL=listS in order to be able to
safely remove vertices. How can I use the subgraph adaptor? It seems to
require the vertex_index property, so I tried this:
typedef subgraph< adjacency_list<listS, listS, undirectedS,
property<vertex_index_t, int>, property<edge_index_t, int> > > Graph;
which gives me nasty errors. It does make sense, if adding vertex_index
to listS does not work. I was surprised by this, because adding
edge_index does do the job if I use EL=listS:
typedef subgraph< adjacency_list<listS, vecS, undirectedS,
property<vertex_index_t, int>, property<edge_index_t, int> > > Graph;
So, back to the topic. I need to be able to remove vertices and edges,
and I need to use subgraphs. What can I do?
Thanks for any help,
Boris
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