TUnuran class. Interface to the UnuRan package for generating non uniform random numbers
TUnuran(TRandom* r = 0, unsigned int log = 0) | |
~TUnuran() | |
bool | Init(const string& distr, const string& method) |
bool | Init(const TUnuranContDist& distr, const string& method = "auto") |
bool | Init(const TUnuranMultiContDist& distr, const string& method = "hitro") |
bool | Init(const TUnuranDiscrDist& distr, const string& method = "auto") |
bool | Init(const TUnuranEmpDist& distr, const string& method = "empk") |
bool | InitBinomial(unsigned int ntot, double prob, string method = "dstd") |
bool | InitPoisson(double mu, string method = "dstd") |
const string& | MethodName() const |
double | Sample() |
int | SampleDiscr() |
bool | SampleMulti(double* x) |
bool | SetLogLevel(unsigned int iflag = 1) |
bool | SetLogStream() |
void | SetSeed(unsigned int seed) |
bool | SetContDistribution(const TUnuranContDist& dist) |
bool | SetDiscreteDistribution(const TUnuranDiscrDist& dist) |
bool | SetEmpiricalDistribution(const TUnuranEmpDist& dist) |
bool | SetMethodAndInit() |
bool | SetMultiDistribution(const TUnuranMultiContDist& dist) |
bool | SetRandomGenerator() |
auto_ptr<TUnuranBaseDist> | fDist | pointer for distribution wrapper |
unur_gen* | fGen | pointer to the UnuRan C generator struct |
string | fMethod | string representing the method |
TRandom* | fRng | pointer to random number generator |
unur_distr* | fUdistr | pointer to the UnuRan C distribution struct |
Constructor with a generator instance and given level of log output
usually copying is non trivial, so we make this unaccessible Copy constructor
initialize with Unuran string interface
Initialize method for continuous one-dimensional distribution.
User must provide a distribution object (which is copied inside) and a string for a method.
For the list of available method for 1D cont. distribution see the
<A href="http://statmath.wu-wien.ac.at/unuran/doc/unuran.html#Methods_005ffor_005fCONT">UnuRan doc</A>.
A re-initialization is needed whenever distribution parameters have been changed.
Initialize method for continuous multi-dimensional distribution.
User must provide a distribution object (which is copied inside) and a string for a method.
For the list of available method for multivariate cont. distribution see the
<A href="http://statmath.wu-wien.ac.at/unuran/doc/unuran.html#Methods_005ffor_005fCVEC">UnuRan doc</A>
A re-initialization is needed whenever distribution parameters have been changed.
Initialize method for continuous one-dimensional discrete distribution.
User must provide a distribution object (which is copied inside) and a string for a method.
For the list of available method for 1D discrete distribution see the
<A href="http://statmath.wu-wien.ac.at/unuran/doc/unuran.html#Methods_005ffor_005fDISCR">UnuRan doc</A>
A re-initialization is needed whenever distribution parameters have been changed.
Initialize method for continuous empirical distribution.
User must provide a distribution object (which is copied inside) and a string for a method.
The distribution object can represent binned (only 1D) or unbinned (1D or multi-dim) data
The method for the unbinned empirical distribution are based on the kernel smoothing, see
<A href="http://statmath.wu-wien.ac.at/software/unuran/doc/unuran.html#EMPK">UnuRan doc</A>
A re-initialization is needed whenever distribution parameters have been changed.
Initialize method for the Poisson distribution Used to generate poisson numbers for a constant parameter mu of the Poisson distribution. Use after the method TUnuran::SampleDiscr to generate the numbers.
Initialize method for the Binomial distribution Used to generate poisson numbers for a constant parameters (n,p) of the Binomial distribution. Use after the method TUnuran::SampleDiscr to generate the numbers.
change the method and initialize Unuran with the previously given distribution