Listing 4: Pruning the Voronoi graph at run time

// assume we already computed numOutsideCurve
for(i =0; i < numOutsideCurve ; ++i)
{
  for(boost::tie(vItr1,vItr2) = boost::vertices(medaxis);
      vItr1 != vItr2; ++vItr1){
    bool insideCurve = 
        boost::get(boost::get(vertex_insidecurve_t(),medaxis), 
                   *vItr1);
    if(!insideCurve)
      {
        boost::clear_vertex(*vItr1,medaxis);
        boost::remove_vertex(*vItr1,medaxis);
        break; // all iterators are invalidated
      }
  }
— End of Listing —