121 bool Init(
const std::string & distr,
const std::string & method);
178 bool InitPoisson(
double mu,
const std::string & method =
"dstd");
188 bool InitBinomial(
unsigned int ntot,
double prob,
const std::string & method =
"dstd");
233 std::string
GetInfo(
bool extended =
false);
268 void SetSeed(
unsigned int seed);
310 std::unique_ptr<TUnuranBaseDist>
fDist;
struct unur_urng UNUR_URNG
struct unur_distr UNUR_DISTR
TH1 is the base class of all histogram classes in ROOT.
This is the base class for the ROOT Random number generators.
TUnuranContDist class describing one dimensional continuous distribution.
TUnuranDiscrDist class for one dimensional discrete distribution.
TUnuranEmpDist class for describing empiral distributions.
TUnuranMultiContDist class describing multi dimensional continuous distributions.
std::string GetGenId() const
Return an ID string about the unuran generator method.
bool IsDistCont() const
Return true for a univariate continous distribution.
bool SetMethodAndInit()
change the method and initialize Unuran with the previously given distribution
int SampleDiscr()
Sample discrete distributions.
bool SetLogStream()
set stream for log and error (not yet implemented)
const std::string & MethodName() const
used Unuran method
std::unique_ptr< TUnuranBaseDist > fDist
bool SetDiscreteDistribution(const TUnuranDiscrDist &dist)
int GetDistType() const
Return the type of the distribution.
bool InitBinomial(unsigned int ntot, double prob, const std::string &method="dstd")
Initialize method for the Binomial distribution.
bool SetContDistribution(const TUnuranContDist &dist)
std::string GetInfo(bool extended=false)
Return an information string about the used Unuran generator method.
bool SampleMulti(double *x)
Sample multidimensional distributions.
bool ReInitDiscrDist(unsigned int npar, double *params)
Reinitialize UNURAN by changing the distribution parameters but mantaining same distribution and meth...
bool IsDistMultiCont() const
Return true for a multivariate continous distribution.
bool Init(const std::string &distr, const std::string &method)
Initialize with Unuran string API interface.
bool SetRandomGenerator()
bool SetLogLevel(unsigned int iflag=1)
set log level
bool SetMultiDistribution(const TUnuranMultiContDist &dist)
bool IsDistEmpirical() const
Return true for an empirical distribution.
double Sample()
Sample 1D distribution.
bool SetEmpiricalDistribution(const TUnuranEmpDist &dist)
TRandom * GetRandom()
Return instance of the random engine used.
bool InitPoisson(double mu, const std::string &method="dstd")
Initialize method for the Poisson distribution.
TUnuran & operator=(const TUnuran &rhs)
Assignment operator.
int GetDimension() const
Return the dimension of unuran generator method.
void SetSeed(unsigned int seed)
set the seed for the random number generator
void SetRandom(TRandom *r)
Set the random engine.
bool IsDistDiscrete() const
Return true for a discrete distribution.