
14 Apr
2004
14 Apr
'04
4:51 p.m.
Vladimir Prus wrote:
4. Together with filter_view, I'd like to have 'filter' function, so that I can do something like:
for_each( filter(vertices(g), boost::lambda::bind(out_degree_f, _1, g) == 0), .....);
Just out of curiosity: Why don't you use a transform_view instead of for_each()? Of course I don't know the details here (i.e. which function is meant by "....."), but wouldn't it be possible here to say filter_view<Vertices, ...> filtered( vertices(g), bind(...) == 0 ); transform_view< filter_view<.,.>, ... > result( filtered, some_function() ); - Roland