RandBinomial


Class defining methods for shooting flat random numbers, double or integers. It provides also static methods to fill with double flat values arrays of specified size.

Default boundaries ]0,1[ for operator()().

Author

Gabriele Cosmo

See also

Engines: HepRandomEngine, DRand48Engine , DualRand, HepJamesRandom, Hurd160Engine, Hurd288Engine, MTwistEngine, RandEngine, RanecuEngine, RanluxEngine, Ranlux64Engine, RanshiEngine, TripleRand

Distributions: HepRandom, RandBit, RandBreitWigner, RandChiSquare, RandExponential, RandFlat, RandGamma, RandGauss, RandGaussQ, RandGaussT, RandGeneral, RandLandau, RandPoisson, RandPoissonQ, RandPoissonT, RandStudentT

Functions: HepStat

Declaration

#include "CLHEP/Random/RandBinomial.h"

class RandBinomial : public HepRandom

Public Member Functions

Constructors
inline RandBinomial(HepRandomEngine& anEngine, long n=1, HepDouble p=0.5)
inline RandBinomial(HepRandomEngine* anEngine, long n=1, HepDouble p=0.5)
These constructors should be used to instantiate a RandBinomial distribution object defining a local engine for it.
The static generator will be skipped using the non-static methods defined below.
If the engine is passed by pointer the corresponding engine object will be deleted by the RandBinomial destructor.
If the engine is passed by reference the corresponding engine object will not be deleted by the RandBinomial destructor.
Destructor
virtual ~RandBinomial()
()
inline HepDouble operator()()
inline HepDouble operator()(long n, HepDouble p)
Methods using the localEngine to shoot random values, by-passing the static generator.
fire
inline HepDouble fire()
HepDouble fire(long n, HepDouble p)
Methods using the localEngine to shoot random values, by-passing the static generator.
fireArray
void fireArray(const HepInt size, HepDouble* vect)
void fireArray(const HepInt size, HepDouble* vect, long n, HepDouble p)
Methods using the localEngine to shoot random values, by-passing the static generator.
shoot
static inline HepDouble shoot()
static HepDouble shoot(long n, HepDouble p)
Static methods to shoot random values using the static generator

static inline HepDouble shoot(HepRandomEngine* anEngine)
static HepDouble shoot(HepRandomEngine* anEngine, long n, HepDouble p)
Static methods to shoot random values using a given engine by-passing the static generator.
shootArray
static void shootArray(const HepInt size, HepDouble* vect, long n=1, HepDouble p=0.5)
Static method to shoot random values using the static generator

static void shootArray(HepRandomEngine* anEngine, const HepInt size, HepDouble* vect, long n=1, HepDouble p=0.5)
Static method to shoot random values using a given engine by-passing the static generator.

Example

CLHEP/test/testRandom.cc


15 May 2000
EVC