Permalink
Browse files

improving inc of i

  • Loading branch information...
1 parent c40c816 commit 52fa2340c897fb9bf640a12b76d9d33242b89815 @nicola committed Nov 23, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 kruskalClass.py
  2. +1 −1 kruskalFunction.py
View
@@ -28,7 +28,7 @@ def find (self, u):
i = 0
for c in self.C:
if (u in c): return (c,i)
- i = i + 1
+ i += 1
def merge (self, ucomp, vcomp):
self.C = [ucomp[0] + vcomp[0]] + [i for j, i in enumerate(self.C) if j not in [ucomp[1], vcomp[1]]]
View
@@ -7,7 +7,7 @@ def find (u, C):
i = 0
for c in C:
if (u in c): return (c,i)
- i = i + 1
+ i += 1
def merge (C, ucomp, vcomp):
return [ucomp[0] + vcomp[0]] + [i for j, i in enumerate(C) if j not in [ucomp[1], vcomp[1]]]

0 comments on commit 52fa234

Please sign in to comment.