nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Refactor ModelRangeManager::get_contiguous_node_id_range()

Open heplesser opened this issue 2 years ago • 1 comments

ModelRangeManager::get_contiguous_node_id_range() uses linear search to find the model range to which a given node ID belongs. ModelRangeManager::get_node_id() does essentially the same thing but uses binary search and returns the model ID instead of a modelrange object.

Questions:

  1. Can not one method be based on the other?
  2. Should we use binary search for both?
  3. Does the C++ standard library provide a binary search implementation we could use?

heplesser avatar Aug 15 '23 11:08 heplesser

Issue automatically marked stale!

github-actions[bot] avatar Oct 15 '23 08:10 github-actions[bot]