| 34 | std::size_t dim() const noexcept { return histogram_.dim(); } |
| 35 | |
| 36 | int idx(std::size_t dim = 0) const noexcept { |
| 37 | if (!cache_) { cache_.set(histogram_); } |
| 38 | cache_.set_idx(idx_); |
| 39 | return cache_.get(dim); |
| 40 | } |
| 41 | |
| 42 | auto bin() const -> decltype(std::declval<Histogram&>().axis()[0]) { |
| 43 | return histogram_.axis()[idx()]; |