Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
qibinyi authored and qibinyi committed Jan 6, 2016
1 parent 2bb7b88 commit 06c2b34
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions codes/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,13 @@ def ClosestSplitPair( lists_x, lists_y , delta ):

def D( p, q ) :
return pow( p[0]-q[0] ,2 ) + pow( p[1]-q[1] ,2 )

for i in xrange( len(Sy) -1 ):
for j in xrange( 7 ):
if i+j+1 >= len(Sy):
for j in xrange( i+1, i+1+7):
if j >= len(Sy):
continue
p = Sy[i]
q = Sy[i+j+1]
q = Sy[j]

dist = D( p, q )
if dist < min_dist:
Expand Down

0 comments on commit 06c2b34

Please sign in to comment.