Extend place_pwlin interface for multivalued. (#1124)
* Add `equal_range()` method to `pw_elements`. * Simplify `embed_pwlin`, `place_pwlin` implementations, in particular the handling of zero-length branches. * Scale segment positions in `embed_pwlin` by divding by branch_length, instead of multiplying by the reciprocal, as the latter is a false economy after all the caveats that need to be checked to preserve ordering and bounds. * Add new method `place_pwlin::all_at()`, which gives all the points that correspond to a single `mlocation`. * Add new method `place_pwlin::all_segments()`, providing the set of segments and/or partial-segments that correspond to an extent. * Add new method `place_pwlin::segments()`, which provides a minimal set of segments and/or partial-segments that map onto an extent. * Extend unit tests to suit. Fixes #1116 and #1068.
Showing
- arbor/include/arbor/morph/place_pwlin.hpp 11 additions, 0 deletionsarbor/include/arbor/morph/place_pwlin.hpp
- arbor/morph/embed_pwlin.cpp 62 additions, 46 deletionsarbor/morph/embed_pwlin.cpp
- arbor/morph/place_pwlin.cpp 112 additions, 35 deletionsarbor/morph/place_pwlin.cpp
- arbor/morph/pwlin_common.hpp 0 additions, 38 deletionsarbor/morph/pwlin_common.hpp
- arbor/util/piecewise.hpp 12 additions, 0 deletionsarbor/util/piecewise.hpp
- test/unit/test_morph_place.cpp 251 additions, 1 deletiontest/unit/test_morph_place.cpp
- test/unit/test_piecewise.cpp 61 additions, 0 deletionstest/unit/test_piecewise.cpp
Please register or sign in to comment