title: Make a boost filtered_graph by vertex label property
body: <p>Currently, I have a graph, that I keep tracking of <code>vertices</code> and <code>labels</code> by means of an <code>external map</code>. So anytime I need to access the label property, I find the label in the map and get the <code>mapped vertex</code>. </p>
  
  <pre><code>/// vertex properties
  struct VertexData
  {
      std::string label;
      int num;
  };
  
  /// edges properties
  struct EdgeData
  {
      std::string edge_name;
      double edge_confidence;
  };
  
  /// define the boost-graph
  typedef boost::adjacency_list&lt;boost::vecS, boost::vecS,
          boost::bidirectionalS,
          boost::property&lt;boost::edge_index_t , size_t , VertexData&gt;,
          boost::property&lt;boost::edge_weight_t, double, EdgeData&gt; &gt; Graph;
  
  /// define vertexMap
  std::map&lt;std::string, vertex_t&gt; vertexMap;
  
  ///loop through the vertices to make the vertexMap here ...
  vertexMap.insert(std::pair&lt;std::string, vertex_t&gt; (label, v));
  
  /// find any label in the map and access the corresponding vertex
  vertex_t vertex = vertexMap.find(label)-&gt;second;
  </code></pre>
  
  <p>Now my question is:
  If I want to make a <code>filtered_graph</code> from current graph by filtering some labels, how should I do that in the <code>class template</code>? The examples in the boost graph library are different, and I checked also this post <a href="https://stackoverflow.com/questions/31522732/boost-graph-copy-and-removing-vertex/31527110#31527110">boost graph copy and removing vertex</a> but it's quite different from what I want to do.</p>
  
  <p>Thanks for any help.</p>