| 363 | } |
| 364 | |
| 365 | std::vector<double> histogram::scotts_rule(const std::vector<double> &x, |
| 366 | double minx, double maxx, |
| 367 | bool hard_limits) { |
| 368 | double binwidth = |
| 369 | 3.5 * stddev(x) / (pow(static_cast<double>(x.size()), 1. / 3.)); |
| 370 | if (!hard_limits) { |
| 371 | return bin_picker(minx, maxx, 0, binwidth); |
| 372 | } else { |
| 373 | double max_x = *std::max_element(x.begin(), x.end()); |
| 374 | double min_x = *std::min_element(x.begin(), x.end()); |
| 375 | return bin_pickerbl(min_x, max_x, minx, maxx, binwidth); |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | std::vector<double> histogram::fd_rule(const std::vector<double> &x, |
| 380 | double minx, double maxx, |
nothing calls this directly
no test coverage detected