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

Method lower

include/boost/histogram/axis/types.hpp:159–171  ·  view source on GitHub ↗

Returns lower edge of bin.

Source from the content-addressed store, hash-verified

157
158 /// Returns lower edge of bin.
159 value_type lower(int i) const noexcept {
160 const auto n = base_type::size();
161 value_type x;
162 if (i < 0)
163 x = -std::numeric_limits<value_type>::infinity();
164 else if (i > n)
165 x = std::numeric_limits<value_type>::infinity();
166 else {
167 const auto z = value_type(i) / n;
168 x = (1.0 - z) * min_ + z * (min_ + delta_ * n);
169 }
170 return transform_type::inverse(x);
171 }
172
173 bin_type operator[](int idx) const noexcept { return bin_type(idx, *this); }
174

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected