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;
128 return (*
fPmf)(double(x));
137 return (*
fCdf)(double(x));
151 for (
int i = i0; i < iN; ++i) {
TUnuranBaseDist, base class for Unuran distribution classees such as TUnuranContDist (for one-dimensi...
static long int sum(long int i)
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
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.
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.
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