MCPcopy Create free account
hub / github.com/boostorg/histogram / set

Method set

include/boost/histogram/detail/index_cache.hpp:47–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45
46 template <typename H>
47 void set(const H& h) {
48 if (!(*this) || h.dim() != ptr_t::get()->state.dim) {
49 ptr_t::reset(new block_t[h.dim() + 1]);
50 ptr_t::get()->state.dim = h.dim();
51 ptr_t::get()->state.idx = 0;
52 }
53 h.for_each_axis(dim_visitor{1, ptr_t::get() + 1});
54 }
55
56 void set_idx(std::size_t idx) {
57 auto& s = ptr_t::get()->state;

Callers 1

idxMethod · 0.80

Calls 2

for_each_axisMethod · 0.80
dimMethod · 0.45

Tested by

no test coverage detected