$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Roland Richter (roland_at_[hidden])
Date: 2004-04-14 11:51:16
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