Bug:
In the case of a single triangle as input:
0\t1
0\t2
1\t2
Ouput is three different communities.
Root cause:
All oms values in the min heap H are 0.0, thus S is 1.0.
This causes the if term in line 135:
"if S != S_prev: "
To always be false, so no update to p is done.
Fix:
Change line 135 to:
if S != S_prev or S== 1.0:
Bug:
In the case of a single triangle as input:
0\t1
0\t2
1\t2
Ouput is three different communities.
Root cause:
All oms values in the min heap H are 0.0, thus S is 1.0.
This causes the if term in line 135:
"if S != S_prev: "
To always be false, so no update to p is done.
Fix:
Change line 135 to:
if S != S_prev or S== 1.0: