-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
matchmaker/matchmaker/dp/oltw_dixon.py
Line 311 in d5c58d7
| def select_candidate(self): |
if min_idx <= len(norm_x_edge):
self.candidate = np.array([self.ref_pointer - offset[0], min_idx])
else:
self.candidate = np.array(
[min_idx - len(norm_x_edge), self.input_pointer - offset[1]]
)
the pointer to the outer edge of the matrix in both matrices needs to be offset by one like so:
if min_idx < len(norm_x_edge):
self.candidate = np.array([self.ref_pointer - offset[0] - 1, min_idx])
else:
self.candidate = np.array(
[min_idx - len(norm_x_edge), self.input_pointer - offset[1] - 1]
)
and the index comparison should probably be strict -> min_idx == len(norm_x_edge) means the minimzer is in the top right corner [0,-1] which is the second clause.
changing this index offset needs adjustments also in the assertion in select_next_direction
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels