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

Method reset

include/boost/histogram/storage/array_storage.hpp:63–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 allocator_type get_allocator() const { return array_.get_allocator(); }
62
63 void reset(std::size_t s) {
64 if (s == size()) {
65 std::fill(array_.begin(), array_.end(), element_type(0));
66 } else {
67 array_ = array_type(s, element_type(0), array_.get_allocator());
68 }
69 }
70
71 std::size_t size() const noexcept { return array_.size(); }
72

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
get_allocatorMethod · 0.45

Tested by

no test coverage detected