make_invalid()
authormarci
Fri, 16 Jan 2004 11:22:05 +0000
changeset 178b29d935f1a6
parent 16 dd19ef4d7ba4
child 18 7c88989ea45b
make_invalid()
src/work/marci_max_flow.hh
     1.1 --- a/src/work/marci_max_flow.hh	Fri Jan 16 11:21:47 2004 +0000
     1.2 +++ b/src/work/marci_max_flow.hh	Fri Jan 16 11:22:05 2004 +0000
     1.3 @@ -44,6 +44,7 @@
     1.4  	}
     1.5        }
     1.6        bool is_valid() { return sym.is_valid(); }
     1.7 +      void make_invalid() { sym.make_invalid(); }
     1.8        void augment(T a) {
     1.9  	if (resG->G.a_node(sym)==resG->G.tail(sym)) { 
    1.10  	  resG->flow.put(sym, resG->flow.get(sym)+a);
    1.11 @@ -81,8 +82,8 @@
    1.12  
    1.13      int id(const node_iterator& v) { return G.id(v); }
    1.14  
    1.15 -    node_iterator invalid_node() { return G.invalid_node(); }
    1.16 -    res_edge_it invalid_edge() { res_edge_it n; n.sym=G.invalid_sym_edge(); return n; }
    1.17 +    //node_iterator invalid_node() { return G.invalid_node(); }
    1.18 +    //res_edge_it invalid_edge() { res_edge_it n; n.sym=G.invalid_sym_edge(); return n; }
    1.19      
    1.20    };
    1.21  
    1.22 @@ -127,8 +128,6 @@
    1.23  	bfs_queue.push(res_graph.first_out_edge(s));
    1.24  
    1.25  	typedef node_property_vector<aug_graph_type, bool> reached_type;
    1.26 -	//reached_type reached(res_graph);
    1.27 -	//for(graph_traits<aug_graph_type>::each_node_iterator i=res_graph.first_node(); i.is_valid(); ++i) { reached.put(i, false); }
    1.28  	reached_type reached(res_graph, false);
    1.29  	reached.put(s, true); 
    1.30  	
    1.31 @@ -137,7 +136,9 @@
    1.32  
    1.33  	typedef node_property_vector<aug_graph_type, graph_traits<aug_graph_type>::edge_iterator> pred_type;
    1.34  	pred_type pred(res_graph);
    1.35 -	pred.put(s, res_graph.invalid_edge());
    1.36 +	graph_traits<aug_graph_type>::edge_iterator a; 
    1.37 +	a.make_invalid();
    1.38 +	pred.put(s, a);
    1.39  
    1.40  	typedef node_property_vector<aug_graph_type, int> free_type;
    1.41  	free_type free(res_graph);