Class defining methods for shooting Flat or Bit random numbers, double or
integers.
It provides methods to fill with double flat values arrays of specified
size, as well as methods for shooting sequences of 0,1 (bits).
Default boundaries ]0.1[ for operator()().
This is derived from RandFlat and is a drop-in replacement.
However the shootBit() and fireBit() methods are
stateless (which makes them
an order of magnitude slower, but allows save/restore engine status
to work correctly).
Author
Mark Fischler
See also
Engines:
HepRandomEngine,
DRand48Engine ,
DualRand,
HepJamesRandom,
Hurd160Engine,
Hurd288Engine,
MTwistEngine,
RandEngine,
RanecuEngine,
RanluxEngine,
Ranlux64Engine,
RanshiEngine,
TripleRand
Distributions:
HepRandom,
RandBinomial,
RandBreitWigner,
RandChiSquare,
RandExponential,
RandFlat,
RandGamma,
RandGauss,
RandGaussQ,
RandGaussT,
RandGeneral,
RandLandau,
RandPoisson,
RandPoissonQ,
RandPoissonT,
RandStudentT
Functions:
HepStat
Declaration
#include "CLHEP/Random/RandBit.h"
class RandBit : public RandFlat
Public Member Functions
- Constructors
- inline RandBit(HepRandomEngine& anEngine)
- inline RandBit(HepRandomEngine& anEngine, HepDouble width)
- inline RandBit(HepRandomEngine& anEngine,
HepDouble a, HepDouble b)
- inline RandBit(HepRandomEngine* anEngine)
- inline RandBit(HepRandomEngine* anEngine, HepDouble width)
- inline RandBit(HepRandomEngine* anEngine,
HepDouble a, HepDouble b)
- These constructors should be used to instantiate a RandBit
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 RandBit destructor.
If the engine is passed by reference the corresponding engine object
will not be deleted by the RandBit destructor.
- Destructor
- virtual ~RandBit()
- fireBit
- inline HepInt fireBit()
- shootBit
- static inline HepInt shootBit()
- static inline HepInt shootBit(HepRandomEngine *)
- Methods using the localEngine to shoot random values, by-passing
the static generator.
- Other than the Bit routines, constructors, and destructor, everything is
simply inherited from RandFlat.
16 May 2000
EVC