Talk:Stoer–Wagner algorithm
Appearance
This article contains two sample implementations. The first one is C++, contains a reference, and appears to work.
I can't get the second one to work. First, I can't tell for sure what language it is. It mostly looks like C, but the code uses C++ reference syntax in one place:
int contract( int &s, int &t )
Even after changing the references to pointers, I couldn't get a sensible answer.
Finally, will memset(bin, false, sizeof(bin)); clear the entire array, or is
memset(bin, false, sizeof(bool)*maxn);
correct?
Single Phase Explanation
It seems that the MinimumCutPhase is missing a couple of sentences. Nowhere is it said in text how to actually pick s, t in the phase mincut.
"So, in a single phase, a pair of vertices s and t , and a min s-t cut C is determined"