BGL: filtering (newbee)

Hi I have a question about graph filtering. My problem is that I would like to filter all edges from a graph g with weight less than 0.01 and all vertices which only has out edges with a weight less than 0.01 The filtering of the edges is show in the documentation. However I have problems with filtering the vertices. Can anyone help? Thanks Line

Hi, On 7/18/07, Line B. Reinhardt <lbr@ctt.dtu.dk> wrote: [snip]
However I have problems with filtering the vertices. Can anyone help?
The filtering of vertices can be done exactly the same way as with the edges. Just exchange the string edge with vertex in the example given in the docs of filtered graph. Then create the filtered graph with: //edge_filter positive_edge_weight<EdgeWeightMap> edge_filter(get(edge_weight, g)); //vertex_filter positive_vertex_weight<VertexWeightMap> vertex_filter(get(vertex_weight, g)); filtered_graph<Graph, positive_edge_weight<EdgeWeightMap> > fg(g, edge_filter, vertex_filter); HTH, Stephan
participants (2)
-
Line B. Reinhardt
-
Stephan Diederich