Geant4-11
|
#include <MixMaxRng.h>
Data Structures | |
struct | rng_state_st |
Public Member Functions | |
double | flat () |
void | flatArray (const int size, double *vect) |
bool | get (const std::vector< unsigned long > &v) |
virtual std::istream & | get (std::istream &is) |
long | getSeed () const |
const long * | getSeeds () const |
bool | getState (const std::vector< unsigned long > &v) |
virtual std::istream & | getState (std::istream &is) |
MixMaxRng () | |
MixMaxRng (const MixMaxRng &rng) | |
MixMaxRng (long seed) | |
MixMaxRng (std::istream &is) | |
std::string | name () const |
operator double () | |
operator float () | |
operator unsigned int () | |
bool | operator!= (const HepRandomEngine &engine) |
MixMaxRng & | operator= (const MixMaxRng &rng) |
bool | operator== (const HepRandomEngine &engine) |
std::vector< unsigned long > | put () const |
virtual std::ostream & | put (std::ostream &os) const |
void | restoreStatus (const char filename[]="MixMaxRngState.conf") |
void | saveStatus (const char filename[]="MixMaxRngState.conf") const |
void | setSeed (long seed, int dum=0) |
void | setSeeds (const long *seeds, int seedNum=0) |
void | showStatus () const |
~MixMaxRng () | |
Static Public Member Functions | |
static std::string | beginTag () |
static std::string | engineName () |
static HepRandomEngine * | newEngine (const std::vector< unsigned long > &v) |
static HepRandomEngine * | newEngine (std::istream &is) |
Static Protected Member Functions | |
static bool | checkFile (std::istream &file, const std::string &filename, const std::string &classname, const std::string &methodname) |
static double | exponent_bit_32 () |
static double | mantissa_bit_12 () |
static double | mantissa_bit_24 () |
static double | mantissa_bit_32 () |
static double | nearlyTwoToMinus_54 () |
static double | twoToMinus_32 () |
static double | twoToMinus_48 () |
static double | twoToMinus_49 () |
static double | twoToMinus_53 () |
Protected Attributes | |
long | theSeed |
const long * | theSeeds |
Private Types | |
typedef struct rng_state_st | rng_state_t |
Private Member Functions | |
myuint_t | apply_bigskip (myuint_t *Vout, myuint_t *Vin, myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID) |
MixMaxRng | Branch () |
void | BranchInplace (int id) |
double | convert1double (myuint_t u) |
myuint_t | fmodmulM61 (myuint_t cum, myuint_t s, myuint_t a) |
double | generate (int i) |
myuint_t | get_next () |
double | get_next_float () |
double | get_next_float_packbits () |
double | iterate () |
myuint_t | iterate_raw_vec (myuint_t *Y, myuint_t sumtotOld) |
MixMaxRng (myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID) | |
myuint_t | MOD_MULSPEC (myuint_t k) |
myuint_t | modadd (myuint_t foo, myuint_t bar) |
myuint_t | MULWU (myuint_t k) |
myuint_t | precalc () |
void | print_state () const |
void | seed64 (myuint_t seedval) |
void | seed_spbox (myuint_t) |
void | seed_uniquestream (myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID) |
void | seed_vielbein (unsigned int i) |
Static Private Member Functions | |
static constexpr int | rng_get_N () |
static constexpr long long int | rng_get_SPECIAL () |
static constexpr int | rng_get_SPECIALMUL () |
Private Attributes | |
rng_state_t | S |
Static Private Attributes | |
static constexpr int | BITS =61 |
static constexpr double | INV_M61 =0.43368086899420177360298E-18 |
static constexpr myuint_t | M61 =2305843009213693951ULL |
static const int | N = 17 |
static constexpr long long int | SPECIAL = ((N==17)? 0 : ((N==240)? 487013230256099140ULL:0) ) |
static constexpr long long int | SPECIALMUL = ((N==17)? 36: ((N==240)? 51 :53) ) |
static constexpr unsigned int | VECTOR_STATE_SIZE = 2*N+4 |
Definition at line 49 of file MixMaxRng.h.
|
private |
Definition at line 182 of file MixMaxRng.h.
CLHEP::MixMaxRng::MixMaxRng | ( | std::istream & | is | ) |
Definition at line 69 of file MixMaxRng.cc.
References get().
CLHEP::MixMaxRng::MixMaxRng | ( | ) |
Definition at line 55 of file MixMaxRng.cc.
References CLHEP::anonymous_namespace{MixMaxRng.cc}::numberOfEngines(), and setSeed().
CLHEP::MixMaxRng::MixMaxRng | ( | long | seed | ) |
Definition at line 62 of file MixMaxRng.cc.
References setSeed(), and CLHEP::HepRandomEngine::theSeed.
CLHEP::MixMaxRng::~MixMaxRng | ( | ) |
Definition at line 75 of file MixMaxRng.cc.
CLHEP::MixMaxRng::MixMaxRng | ( | const MixMaxRng & | rng | ) |
Definition at line 79 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
|
private |
|
private |
Definition at line 599 of file MixMaxRng.cc.
References fmodmulM61(), iterate_raw_vec(), modadd(), N, and Y().
Referenced by seed_uniquestream().
|
static |
Definition at line 402 of file MixMaxRng.cc.
|
private |
Definition at line 731 of file MixMaxRng.cc.
References BranchInplace(), CLHEP::MixMaxRng::rng_state_st::counter, iterate_raw_vec(), S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
|
private |
Definition at line 739 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, iterate_raw_vec(), M61, MIXMAX_MOD_MERSENNE, S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
Referenced by Branch().
|
staticprotectedinherited |
Definition at line 47 of file RandomEngine.cc.
References geant4_check_module_cycles::file.
Referenced by CLHEP::DualRand::restoreStatus(), CLHEP::HepJamesRandom::restoreStatus(), CLHEP::MTwistEngine::restoreStatus(), CLHEP::RanecuEngine::restoreStatus(), CLHEP::RanluxEngine::restoreStatus(), CLHEP::Ranlux64Engine::restoreStatus(), and CLHEP::RanshiEngine::restoreStatus().
|
inlineprivate |
Definition at line 149 of file MixMaxRng.h.
Referenced by generate(), and get_next_float_packbits().
|
static |
Definition at line 252 of file MixMaxRng.cc.
|
inlinestaticprotectedinherited |
|
inlinevirtual |
Implements CLHEP::HepRandomEngine.
Definition at line 65 of file MixMaxRng.h.
References CLHEP::MixMaxRng::rng_state_st::counter, generate(), iterate(), N, and S.
Referenced by flatArray().
|
virtual |
Implements CLHEP::HepRandomEngine.
Definition at line 326 of file MixMaxRng.cc.
References flat().
Definition at line 683 of file MixMaxRng.cc.
References G4INCL::DeuteronDensity::anonymous_namespace{G4INCLDeuteronDensity.cc}::al, M61, MASK32, and CLHEP::s.
Referenced by apply_bigskip(), and MOD_MULSPEC().
|
private |
Definition at line 272 of file MixMaxRng.cc.
References convert1double(), CLHEP::MixMaxRng::rng_state_st::counter, INV_M61, S, CLHEP::MixMaxRng::rng_state_st::V, and Z.
Referenced by flat().
|
virtual |
Reimplemented from CLHEP::HepRandomEngine.
Definition at line 440 of file MixMaxRng.cc.
References getState().
|
virtual |
Reimplemented from CLHEP::HepRandomEngine.
Definition at line 384 of file MixMaxRng.cc.
References getState(), and CLHEP::MarkerLen.
Referenced by MixMaxRng().
|
private |
Definition at line 517 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, iterate_raw_vec(), N, S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
Referenced by get_next_float_packbits().
|
inlineprivate |
Definition at line 131 of file MixMaxRng.h.
References get_next_float_packbits().
|
private |
Definition at line 547 of file MixMaxRng.cc.
References convert1double(), get_next(), and Z.
Referenced by get_next_float().
|
inlineinherited |
|
inlineinherited |
|
virtual |
Reimplemented from CLHEP::HepRandomEngine.
Definition at line 450 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, MASK32, precalc(), rng_get_N(), S, CLHEP::MixMaxRng::rng_state_st::sumtot, CLHEP::MixMaxRng::rng_state_st::V, and VECTOR_STATE_SIZE.
|
virtual |
Reimplemented from CLHEP::HepRandomEngine.
Definition at line 407 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, CLHEP::MarkerLen, precalc(), rng_get_N(), S, CLHEP::MixMaxRng::rng_state_st::sumtot, CLHEP::HepRandomEngine::theSeed, and CLHEP::MixMaxRng::rng_state_st::V.
Referenced by get().
|
private |
Definition at line 296 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, INV_M61, MIXMAX_MOD_MERSENNE, modadd(), MULWU(), S, CLHEP::MixMaxRng::rng_state_st::sumtot, CLHEP::MixMaxRng::rng_state_st::V, and Y().
Referenced by flat().
Definition at line 497 of file MixMaxRng.cc.
References MIXMAX_MOD_MERSENNE, modadd(), MULWU(), N, and Y().
Referenced by apply_bigskip(), Branch(), BranchInplace(), and get_next().
|
inlinestaticprotectedinherited |
Referenced by CLHEP::RanluxEngine::flat(), and CLHEP::RanluxEngine::flatArray().
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
Definition at line 472 of file MixMaxRng.cc.
References fmodmulM61(), N, and SPECIAL.
Definition at line 699 of file MixMaxRng.cc.
References CLHEP::bar, and MIXMAX_MOD_MERSENNE.
Referenced by apply_bigskip(), iterate(), and iterate_raw_vec().
Definition at line 492 of file MixMaxRng.cc.
References BITS, M61, and SPECIALMUL.
Referenced by iterate(), and iterate_raw_vec().
|
inlinevirtual |
Implements CLHEP::HepRandomEngine.
Definition at line 104 of file MixMaxRng.h.
Referenced by source.g4viscp.G4Scene::create_scene(), mcscore.MCParticle::printout(), and source.g4viscp.G4Scene::update_scene().
|
inlinestaticprotectedinherited |
Referenced by CLHEP::DualRand::flat(), CLHEP::MTwistEngine::flat(), and CLHEP::RanshiEngine::flat().
|
staticinherited |
Definition at line 96 of file RandomEngine.cc.
References CLHEP::EngineFactory::newEngine().
|
staticinherited |
Definition at line 91 of file RandomEngine.cc.
References CLHEP::EngineFactory::newEngine().
Referenced by CLHEP::StaticRandomStates::restore().
|
virtual |
Reimplemented from CLHEP::HepRandomEngine.
Definition at line 332 of file MixMaxRng.cc.
References G4AblaRandom::flat().
|
virtual |
Reimplemented from CLHEP::HepRandomEngine.
Definition at line 337 of file MixMaxRng.cc.
References G4AblaRandom::flat().
|
virtual |
Reimplemented from CLHEP::HepRandomEngine.
Definition at line 342 of file MixMaxRng.cc.
|
inlineinherited |
Definition at line 87 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
|
inlineinherited |
|
private |
Definition at line 535 of file MixMaxRng.cc.
References MIXMAX_MOD_MERSENNE, N, S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
Referenced by getState(), and restoreStatus().
|
private |
Definition at line 717 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, rng_get_N(), S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
Referenced by restoreStatus(), and showStatus().
|
virtual |
Reimplemented from CLHEP::HepRandomEngine.
Definition at line 367 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, MASK32, rng_get_N(), S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
|
virtual |
Reimplemented from CLHEP::HepRandomEngine.
Definition at line 349 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, rng_get_N(), S, CLHEP::MixMaxRng::rng_state_st::sumtot, CLHEP::HepRandomEngine::theSeed, and CLHEP::MixMaxRng::rng_state_st::V.
|
virtual |
Implements CLHEP::HepRandomEngine.
Definition at line 124 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, M61, precalc(), print_state(), rng_get_N(), S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
|
staticconstexprprivate |
Definition at line 257 of file MixMaxRng.cc.
References N.
Referenced by getState(), print_state(), put(), restoreStatus(), and saveStatus().
|
staticconstexprprivate |
|
staticconstexprprivate |
Definition at line 267 of file MixMaxRng.cc.
References SPECIALMUL.
|
virtual |
Implements CLHEP::HepRandomEngine.
Definition at line 104 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, rng_get_N(), S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
|
inlineprivate |
Definition at line 138 of file MixMaxRng.h.
References seed_uniquestream().
|
private |
Definition at line 571 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, M61, MIXMAX_MOD_MERSENNE, N, S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
Referenced by setSeed().
|
private |
Definition at line 592 of file MixMaxRng.cc.
References apply_bigskip(), CLHEP::MixMaxRng::rng_state_st::counter, S, seed_vielbein(), CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
Referenced by seed64(), and setSeeds().
|
private |
Definition at line 553 of file MixMaxRng.cc.
References CLHEP::MixMaxRng::rng_state_st::counter, N, S, CLHEP::MixMaxRng::rng_state_st::sumtot, and CLHEP::MixMaxRng::rng_state_st::V.
Referenced by seed_uniquestream().
|
virtual |
Implements CLHEP::HepRandomEngine.
Definition at line 214 of file MixMaxRng.cc.
References seed_spbox(), and CLHEP::HepRandomEngine::theSeed.
Referenced by MixMaxRng().
|
virtual |
Implements CLHEP::HepRandomEngine.
Definition at line 225 of file MixMaxRng.cc.
References MASK32, seed_uniquestream(), CLHEP::HepRandomEngine::theSeed, and CLHEP::HepRandomEngine::theSeeds.
|
virtual |
Implements CLHEP::HepRandomEngine.
Definition at line 204 of file MixMaxRng.cc.
References print_state().
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
Referenced by CLHEP::Ranlux64Engine::flat().
|
inlinestaticprotectedinherited |
Referenced by CLHEP::DualRand::flat(), CLHEP::MTwistEngine::flat(), and CLHEP::RanshiEngine::flat().
|
staticconstexprprivate |
Definition at line 116 of file MixMaxRng.h.
Referenced by MULWU().
|
staticconstexprprivate |
Definition at line 118 of file MixMaxRng.h.
Referenced by generate(), and iterate().
|
staticconstexprprivate |
Definition at line 117 of file MixMaxRng.h.
Referenced by BranchInplace(), fmodmulM61(), MULWU(), restoreStatus(), and seed_spbox().
|
staticprivate |
Definition at line 51 of file MixMaxRng.h.
Referenced by apply_bigskip(), flat(), get_next(), iterate_raw_vec(), MOD_MULSPEC(), precalc(), rng_get_N(), seed_spbox(), and seed_vielbein().
|
private |
Definition at line 183 of file MixMaxRng.h.
Referenced by Branch(), BranchInplace(), flat(), generate(), get_next(), getState(), iterate(), MixMaxRng(), operator=(), precalc(), print_state(), put(), restoreStatus(), saveStatus(), seed_spbox(), seed_uniquestream(), and seed_vielbein().
|
staticconstexprprivate |
Definition at line 113 of file MixMaxRng.h.
Referenced by MOD_MULSPEC(), and rng_get_SPECIAL().
|
staticconstexprprivate |
Definition at line 114 of file MixMaxRng.h.
Referenced by MULWU(), and rng_get_SPECIALMUL().
|
protectedinherited |
Definition at line 142 of file RandomEngine.h.
Referenced by CLHEP::DualRand::DualRand(), CLHEP::HepRandomEngine::getSeed(), CLHEP::DualRand::getState(), CLHEP::HepJamesRandom::getState(), getState(), CLHEP::MTwistEngine::getState(), CLHEP::RanecuEngine::getState(), CLHEP::Ranlux64Engine::getState(), CLHEP::RanluxEngine::getState(), CLHEP::RanshiEngine::getState(), CLHEP::HepJamesRandom::HepJamesRandom(), MixMaxRng(), CLHEP::RanecuEngine::put(), put(), CLHEP::MTwistEngine::put(), CLHEP::RanecuEngine::RanecuEngine(), CLHEP::RanluxEngine::RanluxEngine(), CLHEP::RanluxppEngine::RanluxppEngine(), CLHEP::RanshiEngine::RanshiEngine(), CLHEP::DualRand::restoreStatus(), CLHEP::HepJamesRandom::restoreStatus(), CLHEP::MTwistEngine::restoreStatus(), CLHEP::RanecuEngine::restoreStatus(), CLHEP::RanluxEngine::restoreStatus(), CLHEP::Ranlux64Engine::restoreStatus(), CLHEP::RanshiEngine::restoreStatus(), CLHEP::MTwistEngine::saveStatus(), CLHEP::RanecuEngine::setIndex(), CLHEP::RanecuEngine::setSeed(), CLHEP::HepJamesRandom::setSeed(), setSeed(), CLHEP::RanluxppEngine::setSeed(), CLHEP::Ranlux64Engine::setSeed(), CLHEP::RanluxEngine::setSeed(), CLHEP::DualRand::setSeed(), CLHEP::MTwistEngine::setSeed(), CLHEP::RanecuEngine::setSeeds(), CLHEP::Ranlux64Engine::setSeeds(), CLHEP::RanluxEngine::setSeeds(), setSeeds(), CLHEP::RanshiEngine::setSeeds(), CLHEP::DualRand::showStatus(), CLHEP::HepJamesRandom::showStatus(), CLHEP::MTwistEngine::showStatus(), CLHEP::RanecuEngine::showStatus(), CLHEP::Ranlux64Engine::showStatus(), CLHEP::RanluxEngine::showStatus(), and CLHEP::RanshiEngine::showStatus().
|
protectedinherited |
Definition at line 143 of file RandomEngine.h.
Referenced by CLHEP::HepRandomEngine::getSeeds(), CLHEP::RanecuEngine::RanecuEngine(), CLHEP::RanecuEngine::setIndex(), CLHEP::RanecuEngine::setSeed(), CLHEP::HepJamesRandom::setSeeds(), CLHEP::RanluxppEngine::setSeeds(), CLHEP::RanecuEngine::setSeeds(), CLHEP::Ranlux64Engine::setSeeds(), CLHEP::RanluxEngine::setSeeds(), setSeeds(), CLHEP::DualRand::setSeeds(), CLHEP::MTwistEngine::setSeeds(), and CLHEP::RanshiEngine::setSeeds().
|
staticconstexprprivate |
Definition at line 119 of file MixMaxRng.h.
Referenced by getState().