def vertices_filtered_by (&filter)
      implicit_graph { |g|
        g.vertex_iterator { |b|
          self.each_vertex { |v| b.call(v) if filter.call(v) }
        }
        g.adjacent_iterator { |v, b|
          self.each_adjacent(v) { |u| b.call(u) if filter.call(u) }
        }
      }
    end
def vertices_filtered_by (&filter)
      implicit_graph { |g|
        g.vertex_iterator { |b|
          self.each_vertex { |v| b.call(v) if filter.call(v) }
        }
        g.adjacent_iterator { |v, b|
          self.each_adjacent(v) { |u| b.call(u) if filter.call(u) }
        }
      }
    end
---
 === Graph adaptors

 Return a new ImplicitGraph which has as vertices all vertices of the
 receiver which satisfy the predicate _filter_.

 The methods provides similar functionaty as the BGL graph adapter
 filtered_graph (see BOOST_DOC/filtered_graph.html).

 ==== Example

   def complete (n)
     set = n.integer? ? (1..n) : n
     RGL::ImplicitGraph.new { |g|
           g.vertex_iterator { |b| set.each(&b) }
           g.adjacent_iterator { |x, b|
             set.each { |y| b.call(y) unless x == y }
           }
     }
   end

   complete(4).to_s =>     "(1=2)(1=3)(1=4)(2=3)(2=4)(3=4)"
   complete(4).vertices_filtered_by {|v| v != 4}.to_s => "(1=2)(1=3)(2=3)"