Template Function mrpt::math::histogram
Defined in File ops_containers.h
Function Documentation
-
template<class CONTAINER>
std::vector<double> mrpt::math::histogram(const CONTAINER &v, double limit_min, double limit_max, size_t number_bins, bool do_normalization = false, std::vector<double> *out_bin_centers = nullptr) Computes the normalized or normal histogram of a sequence of numbers given the number of bins and the limits. In any case this is a “linear” histogram, i.e. for matrices, all the elements are taken as if they were a plain sequence, not taking into account they were in columns or rows. If desired, out_bin_centers can be set to receive the bins centers.