1 #ifndef jb_integer_range_binning_hpp 2 #define jb_integer_range_binning_hpp 23 template <
typename sample_type_t>
39 std::is_integral<sample_type>::value,
40 "The sample_type must be an integral type");
42 std::ostringstream os;
43 os <<
"jb::integer_range_binning requires h_min (" << h_min
44 <<
") to be less than h_max (" << h_max <<
")";
45 throw std::invalid_argument(os.str());
63 return std::numeric_limits<sample_type>::min();
66 return std::numeric_limits<sample_type>::max();
75 sample_type x_a, sample_type x_b,
double y_a,
double s,
double q)
const {
87 #endif // jb_integer_range_binning_hpp std::size_t sample2bin(sample_type t) const
sample_type histogram_binning_linear_interpolation(sample_type x_a, sample_type x_b, double y_a, double s, double q)
Convenience function to implement the binning_strategy_concept.
integer_range_binning(sample_type h_min, sample_type h_max)
Constructor based on the histogram range.
sample_type theoretical_max() const
A histogram binning_strategy for integer numbers in a known range.
sample_type theoretical_min() const
sample_type interpolate(sample_type x_a, sample_type x_b, double y_a, double s, double q) const
sample_type bin2sample(std::size_t i) const
sample_type_t sample_type
type traits as required by jb::binning_strategy_concept
sample_type histogram_max() const
sample_type histogram_min() const
The top-level namespace for the JayBeams library.