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

Change the representation of the time-to-segment map #3173

Merged
merged 9 commits into from
Oct 28, 2021

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Oct 27, 2021

Because we can have segments containing a single point, we cannot easily record an entry for each segment in the time-to-segment map. That would require a multimap and it wouldn't be useful anyway because these 1-point segments are not involved in evaluation, forgetting, etc.

Instead we change the time-to-segment map to contain, for coincident left endpoints, an entry for the last segment at that endpoint. That segment may have 1 point if it is at the end of the trajectory, but it will typically contain multiple points and be useful for evaluation, forgetting, etc.

Since we are giving up on the 1:1 correspondence between segments and the time-to-segment map, we also stop recording empty segments in that map: they required the management of sentinels and were generally not helping.

#3136

@eggrobin eggrobin added the LGTM label Oct 28, 2021
@pleroy pleroy merged commit 90e49e6 into mockingbirdnest:delaValléePoussin Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants