Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (19 sloc) 865 Bytes

Histogram

histogram

template<typename X>
std::tuple<std::vector<double>, std::vector<double>> histogram(
  const std::vector<X> &data, size_t bins=10, bool density=false, bool return_edges=false
)

Create a histogram. Returns std::tie(P, x): the count and the locations on the bins (their midpoints, or their edges if return_edges=true).

histogram_uniform

template<typename X>
std::tuple<std::vector<double>, std::vector<double>> histogram_uniform(
  const std::vector<X> &data, size_t bins=10, bool density=false, bool return_edges=false
)

Create a histogram such that each bins contains the same number of entries. Returns std::tie(P, x): the count and the locations on the bins (their midpoints, or their edges if return_edges=true).

You can’t perform that action at this time.