diff options
| author | Paul Jungeblut <paul.jungeblut@gmail.com> | 2017-12-15 14:59:28 +0100 |
|---|---|---|
| committer | Paul Jungeblut <paul.jungeblut@gmail.com> | 2017-12-15 14:59:28 +0100 |
| commit | 82c34c7ac8259ddebd830c8e9ec6ed958e8fada9 (patch) | |
| tree | 859bb0306c47ced5a7b28944b37d704b0c7e6ea2 | |
| parent | 23e039ca88973eca9e2f2529d34be630f880b4b3 (diff) | |
Adding some comments in matching code.
| -rw-r--r-- | graph/maxWeightBipartiteMatching.cpp | 3 | ||||
| -rw-r--r-- | tcr.pdf | bin | 323016 -> 323300 bytes |
2 files changed, 2 insertions, 1 deletions
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. } Binary files differ |
