From 82c34c7ac8259ddebd830c8e9ec6ed958e8fada9 Mon Sep 17 00:00:00 2001 From: Paul Jungeblut Date: Fri, 15 Dec 2017 14:59:28 +0100 Subject: Adding some comments in matching code. --- graph/maxWeightBipartiteMatching.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'graph') diff --git a/graph/maxWeightBipartiteMatching.cpp b/graph/maxWeightBipartiteMatching.cpp index f4bb8c2..2c1ad9d 100644 --- a/graph/maxWeightBipartiteMatching.cpp +++ b/graph/maxWeightBipartiteMatching.cpp @@ -41,6 +41,7 @@ int match(int l, int r) { slack[y] = alt; }}}} while (y != -1) { + // Jede Iteration vergrößert Matching um 1 (können 0-Kanten sein!). int x = augmenting[y]; int prec = xy[x]; yx[y] = x; @@ -48,5 +49,5 @@ int match(int l, int r) { y = prec; }} return accumulate(lx.begin(), lx.end(), 0) + - accumulate(ly.begin(), ly.end(), 0); + accumulate(ly.begin(), ly.end(), 0); // Wert des Matchings. } -- cgit v1.2.3