...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::histogram::indexed — Generates and indexed range forward iterators over a rectangular region of histogram cells.
// In header: <boost/histogram/indexed.hpp> template<typename Histogram, typename Iterable> auto indexed(Histogram && hist, Iterable && range);
Use this in a range-based for loop. Example:
auto hist = make_histogram(axis::integer<>(0, 4), axis::integer<>(2, 6)); axis::index_type range[2] = {{1, 3}, {0, 2}}; for (auto&& x : indexed(hist, range)) { ... }
This skips the first and last index of the first axis, and the last two indices of the second.
Parameters: |
|
||||
Returns: |