44 fPmf( (func) ? new ROOT::Math::WrappedTF1 ( *func) : 0 ),
71 if (
this == &rhs)
return *
this;
125 if (x < static_cast<int>(
fPVec.size()) || x >= static_cast<int>(
fPVec.size()) )
return 0;
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
const ROOT::Math::IGenFunction * fPmf
Class to Wrap a ROOT Function class (like TF1) in a IParamFunction interface of one dimensions to be ...
double Pmf(int x) const
evaluate the distribution (probability mesh function) at the integer value x.
double cdf(double *x, double *p)
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.
TUnuranDiscrDist & operator=(const TUnuranDiscrDist &rhs)
Assignment operator.
double func(double *x, double *p)
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