
Boost Users : 
Subject: [Boostusers] [BGL] Using copy_graph(g_in, g_out) with filtered_graph (and a special predicate) as input yields an unexpectedly empty graph
From: Cedric Laczny (cedric.laczny_at_[hidden])
Date: 20110505 05:05:22
Hi,
in order to select a subgraph based on some predicates, I use filtered_graph()
with an appropriate predicate. To get the resulting subgraph (strictly
speaking it is a new graph), I simply use copy_graph(fg, new_g). In a special
situation, this predicate simply filters on the name and type of a vertex (set
via vertex_properties). This is working as expected. The more, I am working
with multipartite graphs, so there are no edges between 2 vertices of the same
type.
When I now define a predicate that will only let vertices of one special type
to be visible and I use copy_graph() on this filtered_graph, the resulting
graph has no edges (which is ok) but it also has no vertices. I would not
expect the latter to happen. In turn, when I let another type of vertices to
be visible, the resulting graph is again as expected.
Is there perhaps some obvious speciality of copy_graph() I am missing?
Best,
Cedric
Boostusers 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