class TUnuran

Function Members (Methods)

public:
TUnuran(TRandom* r = 0, unsigned int log = 0)
~TUnuran()
boolInit(const string& distr, const string& method)
boolInit(const TUnuranContDist& distr, const string& method = "auto")
boolInit(const TUnuranMultiContDist& distr, const string& method = "hitro")
boolInit(const TUnuranDiscrDist& distr, const string& method = "auto")
boolInit(const TUnuranEmpDist& distr, const string& method = "empk")
boolInitBinomial(unsigned int ntot, double prob, const string& method = "dstd")
boolInitPoisson(double mu, const string& method = "dstd")
const string&MethodName() const
boolReInitDiscrDist(unsigned int npar, double* params)
doubleSample()
intSampleDiscr()
boolSampleMulti(double* x)
boolSetLogLevel(unsigned int iflag = 1)
boolSetLogStream()
voidSetSeed(unsigned int seed)
protected:
boolSetContDistribution(const TUnuranContDist& dist)
boolSetDiscreteDistribution(const TUnuranDiscrDist& dist)
boolSetEmpiricalDistribution(const TUnuranEmpDist& dist)
boolSetMethodAndInit()
boolSetMultiDistribution(const TUnuranMultiContDist& dist)
boolSetRandomGenerator()
private:
TUnuran(const TUnuran&)
TUnuran&operator=(const TUnuran& rhs)

Data Members

protected:
auto_ptr<TUnuranBaseDist>fDistpointer for distribution wrapper
unur_gen*fGenpointer to the UnuRan C generator struct
stringfMethodstring representing the method
TRandom*fRngpointer to random number generator
unur_distr*fUdistrpointer to the UnuRan C distribution struct

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TUnuran(TRandom* r = 0, unsigned int log = 0)
 constructor implementation with a ROOT random generator
 if no generator is given the ROOT default is used
~TUnuran()
 Destructor implementation
TUnuran(const TUnuran& )
 Implementation of copy constructor.
bool Init(const std::string & dist, const std::string & method)
 initialize with a string
bool Init(const TUnuranContDist & distr, const std::string & method)
 initialization with a distribution and and generator
 the distribution object is copied in and managed by this class
 use auto_ptr to manage previously existing distribution objects
bool Init(const TUnuranMultiContDist & distr, const std::string & method)
  initialization with a distribution and method
 the distribution object is copied in and managed by this class
 use auto_ptr to manage previously existing distribution objects
bool Init(const TUnuranDiscrDist & distr, const std::string & method )
   initialization with a distribution and and generator
 the distribution object is copied in and managed by this class
 use auto_ptr to manage previously existing distribution objects
bool Init(const TUnuranEmpDist & distr, const std::string & method )
   initialization with a distribution and and generator
 the distribution object is copied in and managed by this class
 use auto_ptr to manage previously existing distribution objects
bool SetRandomGenerator()
 set an external random generator
bool SetContDistribution(const TUnuranContDist& dist)
 internal method to set in unuran the function pointer for a continous univariate distribution
bool SetMultiDistribution(const TUnuranMultiContDist& dist)
 internal method to set in unuran the function pointer for a multivariate distribution
bool SetEmpiricalDistribution(const TUnuranEmpDist& dist)
bool SetDiscreteDistribution(const TUnuranDiscrDist& dist)
 internal method to set in unuran the function pointer for a discrete univariate distribution
bool SetMethodAndInit()
int SampleDiscr()
 sample one-dimensional distribution
double Sample()
 sample one-dimensional distribution
bool SampleMulti(double* x)
 sample multidimensional distribution
void SetSeed(unsigned int seed)
bool SetLogLevel(unsigned int iflag = 1)
bool InitPoisson(double mu, const string& method = "dstd")
 initializaton for a Poisson
bool InitBinomial(unsigned int ntot, double prob, const string& method = "dstd")
 initializaton for a Binomial
bool ReInitDiscrDist(unsigned int npar, double* params)
 re-initialization of UNURAN without freeing and creating a new fGen object
 works only for pre-defined distribution by changing their parameters
bool SetLogStream()
      set stream for log and error (not yet implemented)

{ return false;}
const std::string & MethodName()
      used Unuran method

{ return fMethod; }

Author: L. Moneta Tue Sep 26 16:25:09 2006
Last change: root/unuran:$Id: TUnuran.h 21604 2008-01-09 09:19:57Z moneta $
Last generated: 2008-06-25 08:54
Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.