Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug in obs index inconsistency between matching and edge objects #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions leuvenmapmatching/matcher/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ def _match_non_emitting_states_end(self, cur_lattice, obs_idx, obs_next,
# Move to next edge
if m.edge_m.l1 != nbr_label2 and m.edge_m.l2 != nbr_label2:
edge_m = Segment(nbr_label1, nbr_loc1, nbr_label2, nbr_loc2)
edge_o = Segment(f"O{obs_idx+1}", obs_next)
edge_o = Segment(f"O{obs_idx}", obs_next)
m_next = m.next(edge_m, edge_o, obs=obs_idx)
if m_next is not None:
if m_next.shortkey in lattice_best:
Expand Down Expand Up @@ -1117,7 +1117,7 @@ def _match_non_emitting_states_end(self, cur_lattice, obs_idx, obs_next,
if m.edge_m.l1 != nbr_label:
# edge_m = Segment(m.edge_m.l1, m.edge_m.p1, nbr_label, nbr_loc)
edge_m = Segment(nbr_label, nbr_loc)
edge_o = Segment(f"O{obs_idx+1}", obs_next)
edge_o = Segment(f"O{obs_idx}", obs_next)
m_next = m.next(edge_m, edge_o, obs=obs_idx)
if m_next is not None:
if m_next.shortkey in lattice_best:
Expand Down