Ticket #4163: kolmogorov_max_flow_test.cpp.diff

File kolmogorov_max_flow_test.cpp.diff, 4.3 KB (added by Chris Jefferson, 12 years ago)

Diff which adds 'this->' where necessary.

  • kolmogorov_max_flow_test.cpp

    old new  
    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);