MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / histogram_edges

Method histogram_edges

source/matplot/axes_objects/histogram.cpp:505–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected