On 9/5/06, Stephan Diederich <S.Diederich@gmx.de > wrote:
Hi Moritz,

2006/9/5, moritz Hilger <moritz.hilger@gmail.com>:
- Zitierten Text anzeigen -
> is there a particular reason that the filtered graph is missing a
> vertex_descriptor vertex(vertices_size_type, const& filtered_graph)
> function? of course this would return exactly the same as the one of the
> underlying graph, nevertheless it would be handy for code treating filtered
> graphs the same way as normal ones.

I think the problem here is the return value of the function. If you
have a VertexPredicate set, it would be possible that the vertex you
specify through the index doesn't exist in the filtered graph.
Maybe a null_vertex() could be returned in that case (But, IIRC, that
null_vertex() doesn't exist in every graph).

hmm, the null_vertex() function is part of the graph concept (http://www.boost.org/libs/graph/doc/Graph.html) and  should return "a special boost::graph_traits<G>::vertex_descriptor object which does not refer to any vertex of graph object which type is G." so why not return this if the VertexPredicate excludes the requested vertex?
cheers,
moritz