comparison pymedcouple @ 20:8e02346789b2

Fix off by one error in P computation
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Sat, 17 Jan 2015 19:54:11 -0500
parents 077261db7a58
children d63e763f8ac1
comparison
equal deleted inserted replaced
19:d9230d702fbf 20:8e02346789b2
173 P = [] 173 P = []
174 Q = [] 174 Q = []
175 175
176 j = 0 176 j = 0
177 for i in xrange(n_plus - 1, -1, -1): 177 for i in xrange(n_plus - 1, -1, -1):
178 while j < n_minus - 1 and h_kern(i, j) - Am > Am_eps: 178 while j < n_minus and h_kern(i, j) - Am > Am_eps:
179 j += 1 179 j += 1
180 P.append(j - 1) 180 P.append(j - 1)
181 181
182 P.reverse() 182 P.reverse()
183 183