|
numerics
|
#include <stats.hpp>
Public Member Functions | |
| Histogram (idx nbins, real lo, real hi) | |
| idx | bin (real x) const |
| Map value to bin index. Returns nbins (out of range sentinel) if outside. | |
| real | bin_centre (idx b) const |
| real | bin_width () const |
| void | fill (real x, real weight=1.0) |
| void | reset () |
| real | total () const |
| std::vector< real > | pdf () const |
| Normalise so that the histogram integrates to 1 (probability density). | |
Public Attributes | |
| std::vector< real > | counts |
| real | lo |
| real | hi |
| idx | nbins |
Fixed-bin histogram over [lo, hi). Useful for umbrella sampling – each window collects a Histogram of the reaction coordinate (e.g. nucleus size), then WHAM stitches them together.
|
inline |
|
inline |
Normalise so that the histogram integrates to 1 (probability density).
Definition at line 87 of file stats.hpp.
References bin_width(), counts, num::ipow(), nbins, num::norm(), and total().
|
inline |
|
inline |
| std::vector<real> num::Histogram::counts |
| real num::Histogram::hi |
Definition at line 53 of file stats.hpp.
Referenced by bin(), bin_centre(), and bin_width().
| real num::Histogram::lo |
Definition at line 53 of file stats.hpp.
Referenced by bin(), bin_centre(), and bin_width().
| idx num::Histogram::nbins |
Definition at line 54 of file stats.hpp.
Referenced by bin(), bin_centre(), bin_width(), fill(), and pdf().