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,
RandBinomial
RandBreitWigner
RandChiSquare
RandExponential
RandGamma
RandGauss
RandGeneral
RandPoisson
RandStudentT
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 )
- To get a flat random number using the operator().
- 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.
- 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
04 May 1999
EVC