Use `using Range = std::array<Value, 2>`. (#319)
By using an `std::array` we can remove the differences between `RawIndex` and `Selection::Ranges`. It also allows us to read `Selection::Ranges` from disk directly via the HighFive API. This change breaks API. One change needed is: ``` - ranges.emplace_back(i_begin, i_end); + ranges.push_back({i_begin, i_end}); ``` another is: ``` - range.first < range.second; + std::get<0>(range) < std::get<1>(range); ``` both are valid for versions before and after this commit. Python code is unaffected.
Showing
- include/bbp/sonata/selection.h 7 additions, 7 deletionsinclude/bbp/sonata/selection.h
- python/bindings.cpp 14 additions, 2 deletionspython/bindings.cpp
- src/edge_index.cpp 1 addition, 8 deletionssrc/edge_index.cpp
- src/report_reader.cpp 31 additions, 30 deletionssrc/report_reader.cpp
- src/selection.cpp 8 additions, 7 deletionssrc/selection.cpp
- tests/test_edges.cpp 1 addition, 1 deletiontests/test_edges.cpp
- tests/test_report_reader.cpp 0 additions, 6 deletionstests/test_report_reader.cpp
Please register or sign in to comment