lmdk_bgt.discount: Fixed bounds
This commit is contained in:
parent
836ac16f16
commit
7101a8eb5b
@ -445,12 +445,12 @@ def discount(seq, lmdks, epsilon):
|
|||||||
# Initialize the sampling rate
|
# Initialize the sampling rate
|
||||||
samp_rt = .5
|
samp_rt = .5
|
||||||
for i, p in enumerate(seq):
|
for i, p in enumerate(seq):
|
||||||
# Adjust the sampling rate
|
|
||||||
if len(lmdks) > 1:
|
|
||||||
samp_rt = lmdks[lmdk_cur][3] / lmdks[len(lmdks) - 1][3]
|
|
||||||
# Check if current point is a landmark
|
# Check if current point is a landmark
|
||||||
if lmdk_lib.is_landmark(p, lmdks):
|
if lmdk_lib.is_landmark(p, lmdks):
|
||||||
lmdk_cur += 1
|
lmdk_cur += 1
|
||||||
|
# Adjust the sampling rate
|
||||||
|
if len(lmdks) > 1:
|
||||||
|
samp_rt = lmdks[lmdk_cur - 1][3] / lmdks[len(lmdks) - 1][3]
|
||||||
# Get coordinates
|
# Get coordinates
|
||||||
loc = (p[1], p[2])
|
loc = (p[1], p[2])
|
||||||
if i == 0 or lmdk_lib.should_sample(samp_rt):
|
if i == 0 or lmdk_lib.should_sample(samp_rt):
|
||||||
|
Loading…
Reference in New Issue
Block a user