| 503 | } |
| 504 | |
| 505 | std::vector<double> |
| 506 | histogram::histogram_edges(const std::vector<double> &data, double minx, |
| 507 | double maxx, binning_algorithm algorithm, |
| 508 | bool hard_limits) { |
| 509 | switch (algorithm) { |
| 510 | case binning_algorithm::automatic: |
| 511 | return automatic_rule(data, minx, maxx, hard_limits); |
| 512 | case binning_algorithm::scott: |
| 513 | return scotts_rule(data, minx, maxx, hard_limits); |
| 514 | case binning_algorithm::fd: |
| 515 | return fd_rule(data, minx, maxx, hard_limits); |
| 516 | case binning_algorithm::integers: |
| 517 | return integers_rule(data, minx, maxx, hard_limits); |
| 518 | case binning_algorithm::sturges: |
| 519 | return sturges_rule(data, minx, maxx, hard_limits); |
| 520 | case binning_algorithm::sqrt: |
| 521 | return sqrt_rule(data, minx, maxx, hard_limits); |
| 522 | } |
| 523 | throw std::logic_error("histogram::histrogram_edges: could not find " |
| 524 | "the binning algorithm"); |
| 525 | } |
| 526 | |
| 527 | std::vector<size_t> |
| 528 | histogram::histogram_count(const std::vector<double> &data, |
nothing calls this directly
no outgoing calls
no test coverage detected