HackAnalysis
2
|
#include <BinnedFn.h>
Public Member Functions | |
BinnedFn2D (const std::vector< TX > &xbinedges, const std::vector< TY > &ybinedges) | |
Constructor taking a list of bin edges. | |
BinnedFn2D (const std::vector< TX > &xbinedges, const std::vector< TY > &ybinedges, const std::vector< T > &binvalues) | |
Constructor taking lists of bin edges and values. | |
size_t | num_bins () const |
Get the number of bins. | |
size_t | num_bins_x () const |
Get the number of bins in x. | |
size_t | num_bins_y () const |
Get the number of bins in y. | |
size_t | get_index_x (const TX &x) const |
Get the x bin index enclosing position x. | |
size_t | get_index_y (const TY &y) const |
Get the y bin index enclosing position y. | |
std::pair< size_t, size_t > | get_index_pair (const TX &x, const TY &y) const |
Get the x,y bin index pair enclosing position (x,y) | |
size_t | get_index (const TX &x, const TY &y) const |
Get the global bin index enclosing position (x,y) | |
size_t | global_index (size_t ix, size_t iy) const |
Get the global bin index from individual indices ix and iy. | |
size_t | global_index (const std::pair< size_t, size_t > &ixiy) const |
Get the global bin index from individual indices ix and iy. | |
const T & | get_at_index (size_t i) const |
Get the value in global bin number i. | |
const T & | get_at_index (size_t ix, size_t iy) const |
Get the value in bin number pair (ix, iy) | |
const T & | get_at (const TX &x, const TY &y) const |
Get the value in the bin at position (x,y) | |
void | set_at_index (size_t i, const T &val) |
Set the value in global bin number ix. | |
void | set_at_index (size_t ix, size_t iy, const T &val) |
Set the value in bin number pair (ix, iy) | |
void | set_at (const TX &x, const TY &y, const T &val) |
Set the value in the bin at position (x,y) | |
void | reset () |
Clear the bin contents (but leave the binning intact) | |
void | check () const |
Check consistency of the edges and values vectors. | |
Public Attributes | |
Binning2D< TX, TY > | binning |
The list of bin edges. | |
std::vector< T > | values |
The list of values. | |
Binned container of Ts in 2D