Skip to content
Snippets Groups Projects
Commit b6c66026 authored by p-hamann's avatar p-hamann
Browse files

Fix assertion

parent ed40c875
Branches
......@@ -7,7 +7,7 @@
edmonds_karp::edmonds_karp(const graph &g, node_id source, node_id sink)
: g(g), source(source), sink(sink) {
assert(source > 0); // Nodes have ids: 1, .., n
assert(source < g.num_nodes());
assert(source <= g.num_nodes());
};
/* Indexes edges of the graph
......@@ -132,4 +132,4 @@ void edmonds_karp::run() {
int edmonds_karp::get_max_flow() const {
return flow_value;
};
\ No newline at end of file
};
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment