HackAnalysis  2
Public Member Functions | Public Attributes | List of all members
HEP::Binning1D< TX > Class Template Reference

#include <BinnedFn.h>

Public Member Functions

 Binning1D (const std::vector< TX > &binedges)
 Constructor taking a list of bin edges.
 
size_t num_bins () const
 Get the number of bins.
 
size_t size () const
 Get the number of bins.
 
size_t get_index (const TX &x) const
 
void reset ()
 Clear the bin contents (but leave the binning intact)
 
void check () const
 Check consistency.
 

Public Attributes

std::vector< TX > edges
 The list of bin edges.
 

Detailed Description

template<typename TX = double>
class HEP::Binning1D< TX >

Simple class just to do 1D bin index lookups. Not a container.

Member Function Documentation

◆ get_index()

template<typename TX = double>
size_t HEP::Binning1D< TX >::get_index ( const TX &  x) const
inline

Get the bin index enclosing position x

Note
This is where all the bin searching intelligence lives

The documentation for this class was generated from the following file: