Class defining methods for shooting flat 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()().
Author
Gabriele Cosmo
See also
Engines:
HepRandomEngine,
DRand48Engine ,
DualRand,
HepJamesRandom,
Hurd160Engine,
Hurd288Engine,
MTwistEngine,
RandEngine,
RanecuEngine,
RanluxEngine,
Ranlux64Engine,
RanshiEngine,
TripleRand
Distributions:
HepRandom,
RandBinomial,
RandBit,
RandBreitWigner,
RandChiSquare,
RandExponential,
RandGamma,
RandGauss,
RandGaussQ,
RandGaussT,
RandGeneral,
RandLandau,
RandPoisson,
RandPoissonQ,
RandPoissonT,
RandStudentT
Functions:
HepStat
Declaration
#include "CLHEP/Random/RandFlat.h"
class RandFlat : public HepRandom
Public Member Functions
- Constructors
- inline RandFlat ( HepRandomEngine& anEngine )
- inline RandFlat ( HepRandomEngine& anEngine,
HepDouble width )
- inline RandFlat ( HepRandomEngine& anEngine,
HepDouble a, HepDouble b )
- inline RandFlat ( HepRandomEngine* anEngine )
- inline RandFlat ( HepRandomEngine* anEngine,
HepDouble width )
- inline RandFlat ( HepRandomEngine* anEngine,
HepDouble a, HepDouble b )
- These constructors should be used to instantiate a RandFlat
distribution object defining a local engine for it.
The static generator will be skeeped using the non-static methods
defined below.
If the engine is passed by pointer then the corresponding engine object
will be deleted by the RandFlat destructor.
If the engine is passed by reference then the corresponding engine
object will not be deleted by the RandFlat destructor.
- Destructor
- virtual ~RandFlat()
- ()
- HepDouble operator()()
- HepDouble operator()( HepDouble width )
- HepDouble operator()( HepDouble a, HepDouble b )
- Methods using the localEngine to shoot random values, by-passing
the static generator.
- fire
- inline HepDouble fire()
- inline HepDouble fire(HepDouble width)
- inline HepDouble fire(HepDouble a, HepDouble b)
- 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,
HepDouble lx, HepDouble dx);
- Methods using the localEngine to shoot random values, by-passing
the static generator.
- fireBit
- inline HepInt fireBit()
- Method using the localEngine to shoot random values, by-passing
the static generator.
- fireInt
- inline long fireInt(long n)
- inline long fireInt(long m, long n)
- Methods using the localEngine to shoot random values, by-passing
the static generator.
- restoreEngineStatus
- static void restoreEngineStatus(const char filename[] =
"Config.conf")
- Restores a saved status (if any) for the current engine.
- saveEngineStatus
- static void saveEngineStatus(const char filename[] =
"Config.conf")
- Saves to file the current status of the current engine.
- Method overriding the base class static saveEngineStatus ones,
by adding extra data so that save in one program, then further
shootBit()s
will produce the identical sequence to restore in another program,
then generating shootBit() randoms there.
- shoot
- static HepDouble shoot()
- static inline HepDouble shoot ( HepDouble width )
- static inline HepDouble shoot ( HepDouble a, HepDouble b )
- Static methods to shoot random values using the static generator.
- static inline HepDouble shoot ( HepRandomEngine* anEngine )
- static inline HepDouble shoot ( HepRandomEngine* anEngine,
HepDouble width )
- static inline HepDouble shoot ( HepRandomEngine* anEngine,
HepDouble a, HepDouble b )
- Static methods to shoot random values using a given engine
by-passing the static generator.
- shootArray
- static void shootArray ( const HepInt size, HepDouble* vect )
- static void shootArray ( const HepInt size, HepDouble* vect,
HepDouble lx, HepDouble dx )
- Static methods to shoot random values using the static generator.
- static inline void shootArray( HepRandomEngine* anEngine,
const HepInt size, HepDouble* vect )
- static void shootArray ( HepRandomEngine* anEngine,
const HepInt size, HepDouble* vect, HepDouble lx, HepDouble dx )
- Static methods to shoot random values using a given engine
by-passing the static generator.
- shootBit
- static inline HepInt shootBit()
- Static method to shoot random values using the static generator.
- static inline HepInt shootBit(HepRandomEngine *)
- Static method to shoot random values using a given engine
by-passing the static generator.
- shootInt
- static inline long shootInt(long n)
- static inline long shootInt(long m, long n)
- Static methods to shoot random values using the static generator.
- static inline long shootInt(HepRandomEngine* anEngine, long n)
- static inline long shootInt(HepRandomEngine* anEngine, long m,
long n)
- Static methods to shoot random values using a given engine
by-passing the static generator.
Example
CLHEP/test/testRandom.cc
17 May 2000
EVC