yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.0
YODA::LogBinEstimator Class Reference

Logarithmic bin estimator. More...

#include <BinEstimators.h>

Inheritance diagram for YODA::LogBinEstimator:
YODA::BinEstimator

Public Member Functions

 LogBinEstimator (size_t nbins, double xlow, double xhigh)
 Constructor.
 
 LogBinEstimator (const LogBinEstimator &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

Logarithmic bin estimator.

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

Todo:
Make a generalised version of this with a transform function

Definition at line 81 of file BinEstimators.h.

Constructor & Destructor Documentation

◆ LogBinEstimator() [1/2]

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

Constructor.

Definition at line 85 of file BinEstimators.h.

85 {
86 _N = nbins;
87 _c = log2(xlow);
88 _m = nbins / (log2(xhigh) - _c);
89 }

◆ LogBinEstimator() [2/2]

YODA::LogBinEstimator::LogBinEstimator ( const LogBinEstimator other)
inline

Copy constructor.

Definition at line 92 of file BinEstimators.h.

92 {
93 _N = other._N;
94 _c = other._c;
95 _m = other._m;
96 }

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