Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Reimplement discontiguous index mode #261

Closed
jadamcrain opened this issue Mar 7, 2019 · 3 comments
Closed

Reimplement discontiguous index mode #261

jadamcrain opened this issue Mar 7, 2019 · 3 comments
Assignees
Milestone

Comments

@jadamcrain
Copy link
Member

jadamcrain commented Mar 7, 2019

The API allows for non-valid configurations. It would be way better to pass in a set of maps (i.e. map<index, point-info>). We can then provide optimized back-end implementations based on:

  1. Arrays for continuous indices
  2. std::map for discontinuous mode

There are enough issues with the way this feature is currently implemented to warrant a complete re-work of the feature using a saner approach.

@jadamcrain jadamcrain self-assigned this Mar 7, 2019
@emgre
Copy link
Member

emgre commented Mar 7, 2019

See also #244.

@jadamcrain
Copy link
Member Author

If this is backed by std::map, you can use lower_bound when searching the map using range.

Say a master asks for points 4 - 7 but only 5 - 8 are defined. lower_bound(4) will return an iterator pointing to 5.

@jadamcrain jadamcrain added this to the 3.0.0 milestone May 24, 2019
@jadamcrain
Copy link
Member Author

Resolved in PR 296

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants