summaryrefslogtreecommitdiff
path: root/maxFlow
diff options
context:
space:
mode:
authorpjungeblut <paul.jungeblut@gmail.com>2014-10-25 17:50:23 +0200
committerpjungeblut <paul.jungeblut@gmail.com>2014-10-25 17:50:23 +0200
commit0b40aa3bb5c635f253d300e8e2885f751848bed8 (patch)
treee2aacd149b7cd820338e7f826f0d05a2e7d8e572 /maxFlow
parent04703be68216170849bfe5151319ec962d3d072b (diff)
adding makefile
Diffstat (limited to 'maxFlow')
-rw-r--r--maxFlow/edmondsKarp.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/maxFlow/edmondsKarp.cpp b/maxFlow/edmondsKarp.cpp
index a2be9a6..ccfb1d2 100644
--- a/maxFlow/edmondsKarp.cpp
+++ b/maxFlow/edmondsKarp.cpp
@@ -10,7 +10,7 @@ void augment(int v, int minEdge) {
res[p[v]][v] -= f; res[v][p[v]] += f;
}}
-int main() { //first inititalize res, adjList, s and t
+nt maxFlow() { //first inititalize res, adjList, s and t
int mf = 0;
while (true) {
f = 0;
@@ -29,5 +29,6 @@ int main() { //first inititalize res, adjList, s and t
augment(t, INF); //add found path to max flow
if (f == 0) break;
mf += f;
-}}
-//max flow in mf} \ No newline at end of file
+ }
+ return maxFlow;
+} \ No newline at end of file