Ticket #4157: boost-graph-fixes.patch

File boost-graph-fixes.patch, 5.5 KB (added by Douglas Gregor, 12 years ago)

Patch to fix Boost.Graph name-lookup issues

  • libs/graph/test/kolmogorov_max_flow_test.cpp

     
    242242          typename std::list<tVertex>::const_iterator it = find(tSuper::m_orphans.begin(), tSuper::m_orphans.end(), v);
    243243          // a node is active, if its in the active_list AND (is has_a_parent, or its already in the orphans_list or its the sink, or its the source)
    244244          bool is_active = (tSuper::m_in_active_list_map[v] && (tSuper::has_parent(v) || it != tSuper::m_orphans.end() ));
    245           if(get_tree(v) != tColorTraits::gray() && !is_active){
     245          if(this->get_tree(v) != tColorTraits::gray() && !is_active){
    246246            typename graph_traits<Graph>::out_edge_iterator ei,e_end;
    247247            for(tie(ei, e_end) = out_edges(v, tSuper::m_g); ei != e_end; ++ei){
    248248              const tVertex& other_node = target(*ei, tSuper::m_g);
    249               if(get_tree(other_node) != get_tree(v)){
    250                 if(get_tree(v) == tColorTraits::black())
     249              if(this->get_tree(other_node) != this->get_tree(v)){
     250                if(this->get_tree(v) == tColorTraits::black())
    251251                  BOOST_CHECK(tSuper::m_res_cap_map[*ei] == 0);
    252252                else
    253253                  BOOST_CHECK(tSuper::m_res_cap_map[tSuper::m_rev_edge_map[*ei]] == 0);
     
    257257        }
    258258
    259259        void invariant_five(const tVertex& v) const{
    260           BOOST_CHECK(get_tree(v) != tColorTraits::gray() || tSuper::m_time_map[v] <= tSuper::m_time);
     260          BOOST_CHECK(this->get_tree(v) != tColorTraits::gray() || tSuper::m_time_map[v] <= tSuper::m_time);
    261261        }
    262262
    263263        void invariant_six(const tVertex& v) const{
    264           if(get_tree(v) == tColorTraits::gray() || tSuper::m_time_map[v] != tSuper::m_time)
     264          if(this->get_tree(v) == tColorTraits::gray() || tSuper::m_time_map[v] != tSuper::m_time)
    265265            return;
    266266          else{
    267267            tVertex current_node = v;
    268268            tDistanceVal distance = 0;
    269             tColorValue color = get_tree(v);
     269            tColorValue color = this->get_tree(v);
    270270            tVertex terminal = (color == tColorTraits::black()) ? tSuper::m_source : tSuper::m_sink;
    271271            while(current_node != terminal){
    272272              BOOST_CHECK(tSuper::has_parent(current_node));
    273               tEdge e = get_edge_to_parent(current_node);
     273              tEdge e = this->get_edge_to_parent(current_node);
    274274              ++distance;
    275275              current_node = (color == tColorTraits::black())? source(e, tSuper::m_g) : target(e, tSuper::m_g);
    276276              if(distance > tSuper::m_dist_map[v])
     
    281281        }
    282282
    283283        void invariant_seven(const tVertex& v) const{
    284           if(get_tree(v) == tColorTraits::gray())
     284          if(this->get_tree(v) == tColorTraits::gray())
    285285            return;
    286286          else{
    287             tColorValue color = get_tree(v);
     287            tColorValue color = this->get_tree(v);
    288288            long time = tSuper::m_time_map[v];
    289289            tVertex current_node = v;
    290290            while(tSuper::has_parent(current_node)){
    291               tEdge e = get_edge_to_parent(current_node);
     291              tEdge e = this->get_edge_to_parent(current_node);
    292292              current_node = (color == tColorTraits::black()) ? source(e, tSuper::m_g) : target(e, tSuper::m_g);
    293293              BOOST_CHECK(tSuper::m_time_map[current_node] >= time);
    294294            }
     
    296296        }//invariant_seven
    297297
    298298        void invariant_eight(const tVertex& v) const{
    299           if(get_tree(v) == tColorTraits::gray())
     299          if(this->get_tree(v) == tColorTraits::gray())
    300300             return;
    301301          else{
    302             tColorValue color = get_tree(v);
     302            tColorValue color = this->get_tree(v);
    303303            long time = tSuper::m_time_map[v];
    304304            tDistanceVal distance = tSuper::m_dist_map[v];
    305305            tVertex current_node = v;
    306306            while(tSuper::has_parent(current_node)){
    307               tEdge e = get_edge_to_parent(current_node);
     307              tEdge e = this->get_edge_to_parent(current_node);
    308308              current_node = (color == tColorTraits::black()) ? source(e, tSuper::m_g) : target(e, tSuper::m_g);
    309309              if(tSuper::m_time_map[current_node] == time)
    310310                BOOST_CHECK(tSuper::m_dist_map[current_node] < distance);
  • boost/graph/eccentricity.hpp

     
    5353    typedef typename property_traits<EccentricityMap>::value_type Eccentricity;
    5454    BOOST_USING_STD_MIN();
    5555    BOOST_USING_STD_MAX();
    56 
     56   
    5757    Eccentricity
    5858            r = numeric_values<Eccentricity>::infinity(),
    5959            d = numeric_values<Eccentricity>::zero();
     
    6868        r = min BOOST_PREVENT_MACRO_SUBSTITUTION (r, e);
    6969        d = max BOOST_PREVENT_MACRO_SUBSTITUTION (d, e);
    7070    }
    71     return make_pair(r, d);
     71    return std::make_pair(r, d);
    7272}
    7373
    7474template <typename Graph, typename EccentricityMap>
     
    8181    typedef typename graph_traits<Graph>::vertex_iterator VertexIterator;
    8282    function_requires< ReadablePropertyMapConcept<EccentricityMap, Vertex> >();
    8383    typedef typename property_traits<EccentricityMap>::value_type Eccentricity;
     84    BOOST_USING_STD_MIN();
     85    BOOST_USING_STD_MAX();
    8486
    8587    VertexIterator i, end;
    8688    tie(i, end) = vertices(g);