25 if (!data.n_elem)
return arma::uvec();
26 uint bin_count = bins;
32 bin_count = (bin_count > 2 ? bin_count : 3);
33 edges = arma::linspace<arma::vec>(data.min() - 1.0, data.max() + 1.0, bin_count + 1);
34 arma::umat hist_data = arma::histc(data, edges);
35 hist_data = arma::sum(hist_data, 1);
37 return arma::conv_to<arma::uvec>::from(hist_data);
43 return uint(std::round(1.0 + 3.332*std::log10((
double(data.n_elem)))));
VESPUCCI_EXPORT arma::uvec GenerateHistogram(const arma::mat &data, arma::vec &edges, uint bins=0)
VESPUCCI_EXPORT uint EstimateBinCount(const arma::mat &data)