Construct axis with n bins over real range [lower, upper). * * \param n number of bins. * \param lower low edge of first bin. * \param upper high edge of last bin. * \param label description of the axis. * \param uoflow whether to add under-/overflow bins. * \param trans arguments passed to the transform. */
| 127 | * \param trans arguments passed to the transform. |
| 128 | */ |
| 129 | regular(unsigned n, value_type lower, value_type upper, string_view label = {}, |
| 130 | uoflow_type uo = uoflow_type::on, transform_type trans = transform_type(), |
| 131 | const allocator_type& a = allocator_type()) |
| 132 | : base_type(n, uo, label, a) |
| 133 | , transform_type(trans) |
| 134 | , min_(trans.forward(lower)) |
| 135 | , delta_((trans.forward(upper) - trans.forward(lower)) / n) { |
| 136 | if (lower < upper) { |
| 137 | BOOST_ASSERT(!std::isnan(min_)); |
| 138 | BOOST_ASSERT(!std::isnan(delta_)); |
| 139 | } else { |
| 140 | throw std::invalid_argument("lower < upper required"); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | regular() = default; |
| 145 | regular(const regular&) = default; |
no test coverage detected