yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.2
YODA::LinBinEstimator Struct Reference

Linear bin estimator. More...

#include <BinEstimators.h>

Inheritance diagram for YODA::LinBinEstimator:
YODA::BinEstimator

Public Member Functions

 LinBinEstimator (size_t nbins, double xlow, double xhigh)
 Constructor.
 
 LinBinEstimator (const LinBinEstimator &other)
 Copy constructor.
 
- Public Member Functions inherited from YODA::BinEstimator
virtual ~BinEstimator ()
 Virtual destructor needed for inheritance.
 
size_t estindex (double x) const
 Return offset bin index estimate, with 0 = underflow and Nbins+1 = overflow.
 
size_t operator() (double x) const
 Return offset bin index estimate, with 0 = underflow and Nbins+1 = overflow.
 

Detailed Description

Linear bin estimator.

This class handles guessing a index bin with a hypothesis of uniformly spaced bins on a linear scale.

Definition at line 48 of file BinEstimators.h.

Constructor & Destructor Documentation

◆ LinBinEstimator() [1/2]

YODA::LinBinEstimator::LinBinEstimator ( size_t  nbins,
double  xlow,
double  xhigh 
)
inline

Constructor.

Definition at line 51 of file BinEstimators.h.

51 {
52 _N = nbins;
53 _c = xlow;
54 _m = (double) nbins / (xhigh - xlow);
55 }

◆ LinBinEstimator() [2/2]

YODA::LinBinEstimator::LinBinEstimator ( const LinBinEstimator other)
inline

Copy constructor.

Definition at line 58 of file BinEstimators.h.

58 {
59 _N = other._N;
60 _c = other._c;
61 _m = other._m;
62 }

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