Lines Matching refs:tolerance
89 def can_iup_in_between(deltas, coords, i, j, tolerance): argument
96 return all(abs(complex(x-p, y-q)) <= tolerance for (x,y),(p,q) in zip(deltas, interp))
98 def _iup_contour_bound_forced_set(delta, coords, tolerance=0): argument
138 if not (min(d1,d2)-tolerance <= dj <= max(d1,d2)+tolerance):
143 if abs(dj - d1) > tolerance:
146 if abs(dj) > tolerance:
152 if dj != d1 and ((dj-tolerance < d1) != (d1 < d2)):
155 if d2 != dj and ((d2 < dj+tolerance) != (d1 < d2)):
166 def _iup_contour_optimize_dp(delta, coords, forced={}, tolerance=0, lookback=None): argument
194 if cost < best_cost and can_iup_in_between(delta, coords, j, i, tolerance):
216 def iup_contour_optimize(delta, coords, tolerance=0.): argument
222 if all(abs(complex(*p)) <= tolerance for p in delta):
236 forced = _iup_contour_bound_forced_set(delta, coords, tolerance)
252 chain, costs = _iup_contour_optimize_dp(delta, coords, forced, tolerance)
268 chain, costs = _iup_contour_optimize_dp(delta+delta, coords+coords, forced, tolerance, n)
288 def iup_delta_optimize(delta, coords, ends, tolerance=0.): argument
295 contour = iup_contour_optimize(delta[start:end+1], coords[start:end+1], tolerance)