[Lemon-commits] [lemon_svn] marci: r30 - hugo/trunk/src/work
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:36:55 CET 2006
Author: marci
Date: Fri Jan 16 12:22:05 2004
New Revision: 30
Modified:
hugo/trunk/src/work/marci_max_flow.hh
Log:
make_invalid()
Modified: hugo/trunk/src/work/marci_max_flow.hh
==============================================================================
--- hugo/trunk/src/work/marci_max_flow.hh (original)
+++ hugo/trunk/src/work/marci_max_flow.hh Fri Jan 16 12:22:05 2004
@@ -44,6 +44,7 @@
}
}
bool is_valid() { return sym.is_valid(); }
+ void make_invalid() { sym.make_invalid(); }
void augment(T a) {
if (resG->G.a_node(sym)==resG->G.tail(sym)) {
resG->flow.put(sym, resG->flow.get(sym)+a);
@@ -81,8 +82,8 @@
int id(const node_iterator& v) { return G.id(v); }
- node_iterator invalid_node() { return G.invalid_node(); }
- res_edge_it invalid_edge() { res_edge_it n; n.sym=G.invalid_sym_edge(); return n; }
+ //node_iterator invalid_node() { return G.invalid_node(); }
+ //res_edge_it invalid_edge() { res_edge_it n; n.sym=G.invalid_sym_edge(); return n; }
};
@@ -127,8 +128,6 @@
bfs_queue.push(res_graph.first_out_edge(s));
typedef node_property_vector<aug_graph_type, bool> reached_type;
- //reached_type reached(res_graph);
- //for(graph_traits<aug_graph_type>::each_node_iterator i=res_graph.first_node(); i.is_valid(); ++i) { reached.put(i, false); }
reached_type reached(res_graph, false);
reached.put(s, true);
@@ -137,7 +136,9 @@
typedef node_property_vector<aug_graph_type, graph_traits<aug_graph_type>::edge_iterator> pred_type;
pred_type pred(res_graph);
- pred.put(s, res_graph.invalid_edge());
+ graph_traits<aug_graph_type>::edge_iterator a;
+ a.make_invalid();
+ pred.put(s, a);
typedef node_property_vector<aug_graph_type, int> free_type;
free_type free(res_graph);
More information about the Lemon-commits
mailing list