From 0b40aa3bb5c635f253d300e8e2885f751848bed8 Mon Sep 17 00:00:00 2001 From: pjungeblut Date: Sat, 25 Oct 2014 17:50:23 +0200 Subject: adding makefile --- maxFlow/edmondsKarp.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'maxFlow/edmondsKarp.cpp') 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 -- cgit v1.2.3