46 const std::vector<double>& values,
49 for (
const auto v : values) {
55 const std::vector<std::pair<double,double>>& weighted_values
57 for(
auto const& pair : weighted_values ) {
65 swap(values_, other.values_);
74 return values_.cbegin();
79 return values_.cend();
109 return values_.begin()->first;
114 return values_.rbegin()->first;
119 return values_.size();
124 return values_.empty();
135 return added_values_;
152 auto upper = std::nextafter(
max(),
max() + 1);
154 if (integer_ranges) {
155 lower = std::floor(lower);
156 upper = std::ceil(upper);
159 auto h =
Histogram(num_bins, lower, upper);
160 for (
const auto& pair : values_) {
161 h.accumulate(pair.first, pair.second);
173 for (
const auto& pair : values_) {
174 h.accumulate(pair.first, pair.second);