17 #include "Math/WrappedTF1.h" 44 fPmf( (func) ? new
ROOT::
Math::WrappedTF1 ( *func) : 0 ),
71 if (
this == &rhs)
return *
this;
118 fCdf = (cdf) ?
new ROOT::Math::WrappedTF1 ( *cdf) : 0;
125 if (x < static_cast<int>(
fPVec.size()) || x >= static_cast<int>(
fPVec.size()) )
return 0;
128 return (*
fPmf)(double(x));
137 return (*
fCdf)(double(x));
150 double sum = ( i0 > 0 ) ?
fPVecSum.back() : 0;
151 for (
int i = i0; i < iN; ++i) {
TUnuranBaseDist, base class for Unuran distribution classees such as TUnuranContDist (for one-dimensi...
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
const ROOT::Math::IGenFunction * fCdf
Namespace for new ROOT classes and functions.
const ROOT::Math::IGenFunction * fPmf
double Pmf(int x) const
evaluate the distribution (probability mesh function) at the integer value x.
TUnuranDiscrDist(const ROOT::Math::IGenFunction &func, bool copyFunc=false)
Constructor from a generic function object specifying the pdf.
TUnuranDiscrDist class for one dimensional discrete distribution.
void SetCdf(const ROOT::Math::IGenFunction &cdf)
set cdf distribution from a generic function interface.
* x
Deprecated and error prone model selection interface.
TUnuranDiscrDist & operator=(const TUnuranDiscrDist &rhs)
Assignment operator.
Namespace for new Math classes and functions.
double Cdf(int x) const
evaluate the integral (cdf) on the given domain
virtual IBaseFunctionOneDim * Clone() const =0
Clone a function.
virtual ~TUnuranDiscrDist()
Destructor.
std::vector< double > fPVecSum
std::vector< double > fPVec