Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes | List of all members
CLHEP::RandExpZiggurat Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/geant4/v4_10_4_p02ba/source/geant4.10.04.p02/source/externals/clhep/include/CLHEP/Random/RandExpZiggurat.h"

Inheritance diagram for CLHEP::RandExpZiggurat:
CLHEP::HepRandom

Public Member Functions

 RandExpZiggurat (HepRandomEngine &anEngine, double mean=1.0)
 
 RandExpZiggurat (HepRandomEngine *anEngine, double mean=1.0)
 
virtual ~RandExpZiggurat ()
 
float fire ()
 
float fire (float mean)
 
void fireArray (const int size, float *vect)
 
void fireArray (const int size, double *vect)
 
void fireArray (const int size, float *vect, float mean)
 
void fireArray (const int size, double *vect, double mean)
 
virtual double operator() ()
 
float operator() (float mean)
 
std::ostream & put (std::ostream &os) const
 
std::istream & get (std::istream &is)
 
std::string name () const
 
HepRandomEngineengine ()
 
double flat ()
 
double flat (HepRandomEngine *theNewEngine)
 
void flatArray (const int size, double *vect)
 
void flatArray (HepRandomEngine *theNewEngine, const int size, double *vect)
 

Static Public Member Functions

static float shoot ()
 
static float shoot (float mean)
 
static void shootArray (const int size, float *vect, float mean=1.0)
 
static void shootArray (const int size, double *vect, double mean=1.0)
 
static float shoot (HepRandomEngine *anEngine)
 
static float shoot (HepRandomEngine *anEngine, float mean)
 
static void shootArray (HepRandomEngine *anEngine, const int size, float *vect, float mean=1.0)
 
static void shootArray (HepRandomEngine *anEngine, const int size, double *vect, double mean=1.0)
 
static std::string distributionName ()
 
static bool ziggurat_init ()
 
static void setTheSeed (long seed, int lux=3)
 
static long getTheSeed ()
 
static void setTheSeeds (const long *seeds, int aux=-1)
 
static const long * getTheSeeds ()
 
static void getTheTableSeeds (long *seeds, int index)
 
static HepRandomgetTheGenerator ()
 
static void setTheEngine (HepRandomEngine *theNewEngine)
 
static HepRandomEnginegetTheEngine ()
 
static void saveEngineStatus (const char filename[]="Config.conf")
 
static void restoreEngineStatus (const char filename[]="Config.conf")
 
static std::ostream & saveFullState (std::ostream &os)
 
static std::istream & restoreFullState (std::istream &is)
 
static std::ostream & saveDistState (std::ostream &os)
 
static std::istream & restoreDistState (std::istream &is)
 
static std::ostream & saveStaticRandomStates (std::ostream &os)
 
static std::istream & restoreStaticRandomStates (std::istream &is)
 
static void showEngineStatus ()
 
static int createInstance ()
 

Static Protected Member Functions

static unsigned long ziggurat_SHR3 (HepRandomEngine *anEngine)
 
static float ziggurat_UNI (HepRandomEngine *anEngine)
 
static float ziggurat_REXP (HepRandomEngine *anEngine)
 
static float ziggurat_efix (unsigned long jz, HepRandomEngine *anEngine)
 

Static Protected Attributes

static CLHEP_THREAD_LOCAL unsigned long kn [128]
 
static CLHEP_THREAD_LOCAL unsigned long ke [256]
 
static CLHEP_THREAD_LOCAL float wn [128]
 
static CLHEP_THREAD_LOCAL float fn [128]
 
static CLHEP_THREAD_LOCAL float we [256]
 
static CLHEP_THREAD_LOCAL float fe [256]
 
static CLHEP_THREAD_LOCAL bool ziggurat_is_init
 
static const long seedTable [215][2]
 

Private Member Functions

 RandExpZiggurat (const RandExpZiggurat &d)
 

Private Attributes

std::shared_ptr< HepRandomEnginelocalEngine
 
double defaultMean
 

Detailed Description

Author
ATLAS

Definition at line 36 of file RandExpZiggurat.h.

Constructor & Destructor Documentation

CLHEP::RandExpZiggurat::RandExpZiggurat ( HepRandomEngine anEngine,
double  mean = 1.0 
)
inline

Definition at line 158 of file RandExpZiggurat.h.

Referenced by ziggurat_REXP().

158  : localEngine(&anEngine, do_nothing_deleter()), defaultMean(mean)
159 {
160 }
std::shared_ptr< HepRandomEngine > localEngine
CLHEP::RandExpZiggurat::RandExpZiggurat ( HepRandomEngine anEngine,
double  mean = 1.0 
)
inline

Definition at line 162 of file RandExpZiggurat.h.

162  : localEngine(anEngine), defaultMean(mean)
163 {
164 }
std::shared_ptr< HepRandomEngine > localEngine
virtual CLHEP::RandExpZiggurat::~RandExpZiggurat ( )
virtual
CLHEP::RandExpZiggurat::RandExpZiggurat ( const RandExpZiggurat d)
private

Member Function Documentation

static int CLHEP::HepRandom::createInstance ( )
staticinherited
static std::string CLHEP::RandExpZiggurat::distributionName ( )
inlinestatic

Definition at line 109 of file RandExpZiggurat.h.

References ziggurat_init().

109 {return "RandExpZiggurat";}
HepRandomEngine& CLHEP::RandExpZiggurat::engine ( )
virtual

Reimplemented from CLHEP::HepRandom.

Referenced by operator()().

float CLHEP::RandExpZiggurat::fire ( )
inline

Definition at line 85 of file RandExpZiggurat.h.

References defaultMean, and fire().

Referenced by fire(), and operator()().

float CLHEP::RandExpZiggurat::fire ( float  mean)
inline

Definition at line 86 of file RandExpZiggurat.h.

References fireArray(), localEngine, extractScale::mean, operator()(), and ziggurat_REXP().

86 {return ziggurat_REXP(localEngine.get())*mean;};
std::shared_ptr< HepRandomEngine > localEngine
static float ziggurat_REXP(HepRandomEngine *anEngine)
void CLHEP::RandExpZiggurat::fireArray ( const int  size,
float *  vect 
)

Referenced by fire().

void CLHEP::RandExpZiggurat::fireArray ( const int  size,
double *  vect 
)
void CLHEP::RandExpZiggurat::fireArray ( const int  size,
float *  vect,
float  mean 
)
void CLHEP::RandExpZiggurat::fireArray ( const int  size,
double *  vect,
double  mean 
)
double CLHEP::HepRandom::flat ( )
inherited
double CLHEP::HepRandom::flat ( HepRandomEngine theNewEngine)
inlineinherited
void CLHEP::HepRandom::flatArray ( const int  size,
double *  vect 
)
inherited
void CLHEP::HepRandom::flatArray ( HepRandomEngine theNewEngine,
const int  size,
double *  vect 
)
inlineinherited
std::istream& CLHEP::RandExpZiggurat::get ( std::istream &  is)
virtual

Reimplemented from CLHEP::HepRandom.

static HepRandomEngine* CLHEP::HepRandom::getTheEngine ( )
staticinherited
static HepRandom* CLHEP::HepRandom::getTheGenerator ( )
staticinherited
static long CLHEP::HepRandom::getTheSeed ( )
staticinherited
static const long* CLHEP::HepRandom::getTheSeeds ( )
staticinherited
static void CLHEP::HepRandom::getTheTableSeeds ( long *  seeds,
int  index 
)
staticinherited
std::string CLHEP::RandExpZiggurat::name ( ) const
virtual
virtual double CLHEP::RandExpZiggurat::operator() ( )
virtual

Reimplemented from CLHEP::HepRandom.

Referenced by fire().

float CLHEP::RandExpZiggurat::operator() ( float  mean)
inline

Definition at line 99 of file RandExpZiggurat.h.

References engine(), fire(), name(), put(), and string.

99 {return fire( mean );};
std::ostream& CLHEP::RandExpZiggurat::put ( std::ostream &  os) const
virtual

Reimplemented from CLHEP::HepRandom.

Referenced by operator()().

static std::istream& CLHEP::HepRandom::restoreDistState ( std::istream &  is)
inlinestaticinherited
static void CLHEP::HepRandom::restoreEngineStatus ( const char  filename[] = "Config.conf")
staticinherited
static std::istream& CLHEP::HepRandom::restoreFullState ( std::istream &  is)
staticinherited
static std::istream& CLHEP::HepRandom::restoreStaticRandomStates ( std::istream &  is)
staticinherited
static std::ostream& CLHEP::HepRandom::saveDistState ( std::ostream &  os)
inlinestaticinherited

Definition at line 134 of file Random.h.

134 {return os;}
static void CLHEP::HepRandom::saveEngineStatus ( const char  filename[] = "Config.conf")
staticinherited
static std::ostream& CLHEP::HepRandom::saveFullState ( std::ostream &  os)
staticinherited
static std::ostream& CLHEP::HepRandom::saveStaticRandomStates ( std::ostream &  os)
staticinherited
static void CLHEP::HepRandom::setTheEngine ( HepRandomEngine theNewEngine)
staticinherited
static void CLHEP::HepRandom::setTheSeed ( long  seed,
int  lux = 3 
)
staticinherited
static void CLHEP::HepRandom::setTheSeeds ( const long *  seeds,
int  aux = -1 
)
staticinherited
static float CLHEP::RandExpZiggurat::shoot ( )
inlinestatic

Definition at line 56 of file RandExpZiggurat.h.

References CLHEP::HepRandom::getTheEngine(), and shoot().

Referenced by shoot().

56 {return shoot(HepRandom::getTheEngine());};
static HepRandomEngine * getTheEngine()
static float CLHEP::RandExpZiggurat::shoot ( float  mean)
inlinestatic

Definition at line 57 of file RandExpZiggurat.h.

References CLHEP::HepRandom::getTheEngine(), extractScale::mean, shoot(), shootArray(), and gen_flatrecord::size.

Referenced by shoot().

static HepRandomEngine * getTheEngine()
static float CLHEP::RandExpZiggurat::shoot ( HepRandomEngine anEngine)
inlinestatic

Definition at line 70 of file RandExpZiggurat.h.

References ziggurat_REXP().

70 {return ziggurat_REXP(anEngine);};
static float ziggurat_REXP(HepRandomEngine *anEngine)
static float CLHEP::RandExpZiggurat::shoot ( HepRandomEngine anEngine,
float  mean 
)
inlinestatic

Definition at line 71 of file RandExpZiggurat.h.

References extractScale::mean, shoot(), and shootArray().

Referenced by shoot().

71 {return shoot(anEngine)*mean;};
static void CLHEP::RandExpZiggurat::shootArray ( const int  size,
float *  vect,
float  mean = 1.0 
)
static

Referenced by shoot().

static void CLHEP::RandExpZiggurat::shootArray ( const int  size,
double *  vect,
double  mean = 1.0 
)
static
static void CLHEP::RandExpZiggurat::shootArray ( HepRandomEngine anEngine,
const int  size,
float *  vect,
float  mean = 1.0 
)
static
static void CLHEP::RandExpZiggurat::shootArray ( HepRandomEngine anEngine,
const int  size,
double *  vect,
double  mean = 1.0 
)
static
static void CLHEP::HepRandom::showEngineStatus ( )
staticinherited
static float CLHEP::RandExpZiggurat::ziggurat_efix ( unsigned long  jz,
HepRandomEngine anEngine 
)
staticprotected

Referenced by ziggurat_REXP().

static bool CLHEP::RandExpZiggurat::ziggurat_init ( )
static

Referenced by distributionName(), and ziggurat_REXP().

static float CLHEP::RandExpZiggurat::ziggurat_REXP ( HepRandomEngine anEngine)
inlinestaticprotected

Definition at line 137 of file RandExpZiggurat.h.

References d, RandExpZiggurat(), ziggurat_efix(), ziggurat_init(), and ziggurat_SHR3().

Referenced by fire(), and shoot().

137  {
139  unsigned long jz=ziggurat_SHR3(anEngine);
140  unsigned long iz=jz&255;
141  return (jz<ke[iz]) ? jz*we[iz] : ziggurat_efix(jz,anEngine);
142  };
static unsigned long ziggurat_SHR3(HepRandomEngine *anEngine)
static bool ziggurat_init()
static CLHEP_THREAD_LOCAL float we[256]
static float ziggurat_efix(unsigned long jz, HepRandomEngine *anEngine)
static CLHEP_THREAD_LOCAL unsigned long ke[256]
static CLHEP_THREAD_LOCAL bool ziggurat_is_init
static unsigned long CLHEP::RandExpZiggurat::ziggurat_SHR3 ( HepRandomEngine anEngine)
inlinestaticprotected

Definition at line 135 of file RandExpZiggurat.h.

Referenced by ziggurat_REXP().

135 {return (unsigned int)(*anEngine);};
static float CLHEP::RandExpZiggurat::ziggurat_UNI ( HepRandomEngine anEngine)
inlinestaticprotected

Definition at line 136 of file RandExpZiggurat.h.

References CLHEP::HepRandomEngine::flat().

136 {return anEngine->flat();};

Member Data Documentation

double CLHEP::RandExpZiggurat::defaultMean
private

Definition at line 151 of file RandExpZiggurat.h.

Referenced by fire().

CLHEP_THREAD_LOCAL float CLHEP::RandExpZiggurat::fe[256]
staticprotected

Definition at line 131 of file RandExpZiggurat.h.

CLHEP_THREAD_LOCAL float CLHEP::RandExpZiggurat::fn[128]
staticprotected

Definition at line 131 of file RandExpZiggurat.h.

CLHEP_THREAD_LOCAL unsigned long CLHEP::RandExpZiggurat::ke[256]
staticprotected

Definition at line 130 of file RandExpZiggurat.h.

CLHEP_THREAD_LOCAL unsigned long CLHEP::RandExpZiggurat::kn[128]
staticprotected

Definition at line 130 of file RandExpZiggurat.h.

std::shared_ptr<HepRandomEngine> CLHEP::RandExpZiggurat::localEngine
private

Definition at line 150 of file RandExpZiggurat.h.

Referenced by fire().

const long CLHEP::HepRandom::seedTable
staticprotectedinherited

Definition at line 157 of file Random.h.

CLHEP_THREAD_LOCAL float CLHEP::RandExpZiggurat::we[256]
staticprotected

Definition at line 131 of file RandExpZiggurat.h.

CLHEP_THREAD_LOCAL float CLHEP::RandExpZiggurat::wn[128]
staticprotected

Definition at line 131 of file RandExpZiggurat.h.

CLHEP_THREAD_LOCAL bool CLHEP::RandExpZiggurat::ziggurat_is_init
staticprotected

Definition at line 133 of file RandExpZiggurat.h.


The documentation for this class was generated from the following file: