yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.3
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.
 
- 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 82 of file BinEstimators.h.

Constructor & Destructor Documentation

◆ LogBinEstimator()

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

Constructor.

Definition at line 86 of file BinEstimators.h.

86 {
87 _N = nbins;
88 _c = Utils::fastlog2(xlow);
89 _m = nbins / (Utils::fastlog2(xhigh) - _c);
90 }

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