ROOT 6.08/07 Reference Guide |
Wrapper class for the MIXMAX Random number generator.
It is a matrix-recursive random number generator introduced by G. Savvidy.
See the real implementation in the mixmax.h and mixmax.cxx files. The generator code is available also at hepforge: http://mixmax.hepforge.org
Created by Konstantin Savvidy.
The code is released under GNU Lesser General Public License v3
References:
G.K.Savvidy and N.G.Ter-Arutyunian, On the Monte Carlo simulation of physical systems, J.Comput.Phys. 97, 566 (1991); Preprint EPI-865-16-86, Yerevan, Jan. 1986
K.Savvidy The MIXMAX random number generator Comp. Phys. Commun. 196 (2015), pp 161–165 http://dx.doi.org/10.1016/j.cpc.2015.06.003
K.Savvidy and G.Savvidy Spectrum and Entropy of C-systems. MIXMAX random number generator Chaos, Solitons & Fractals, Volume 91, (2016) pp. 33–38 http://dx.doi.org/10.1016/j.chaos.2016.05.003
The period of the generator is 10^4682 for N=256, and 10^1597 for N=88
This implementation is only a wrapper around the real implemention, see mixmax.cxx and mixmax.h The generator, in C code, is available also at hepforge: http://mixmax.hepforge.org
Definition at line 82 of file MixMaxEngine.h.
Public Types | |
typedef TRandomEngine | BaseType |
typedef uint64_t | Result_t |
typedef uint64_t | StateInt_t |
Public Member Functions | |
MixMaxEngine (uint64_t seed=1) | |
virtual | ~MixMaxEngine () |
Result_t | IntRndm () |
generate a 64 bit integer number More... | |
double | operator() () |
generate a double random number (faster interface) More... | |
virtual double | Rndm () |
void | RndmArray (int n, double *array) |
generate an array of random numbers More... | |
void | SetSeed (Result_t seed) |
set the generator seed More... | |
Public Member Functions inherited from ROOT::Math::TRandomEngine | |
virtual | ~TRandomEngine () |
Static Public Member Functions | |
static uint64_t | MaxInt () |
maximum integer that can be generated. For MIXMAX is 2^61-1 More... | |
static uint64_t | MinInt () |
minimum integer that can be generated. For MIXMAX is 0 More... | |
static std::string | Name () |
get name of the generator More... | |
static int | Size () |
Get the size of the generator. More... | |
Protected Member Functions | |
int | Counter () const |
Get the counter (between 0 and Size-1) More... | |
void | GetState (std::vector< StateInt_t > &state) const |
get the state of the generator More... | |
void | SetState (const std::vector< StateInt_t > &state) |
set the full initial generator state More... | |
Private Member Functions | |
double | Rndm_impl () |
implementation function to generate the random number More... | |
Private Attributes | |
MixMaxEngineImpl< N > * | fRng |
#include <Math/MixMaxEngine.h>
typedef TRandomEngine ROOT::Math::MixMaxEngine< N, SkipNumber >::BaseType |
Definition at line 86 of file MixMaxEngine.h.
typedef uint64_t ROOT::Math::MixMaxEngine< N, SkipNumber >::Result_t |
Definition at line 94 of file MixMaxEngine.h.
typedef uint64_t ROOT::Math::MixMaxEngine< N, SkipNumber >::StateInt_t |
Definition at line 90 of file MixMaxEngine.h.
ROOT::Math::MixMaxEngine< N, S >::MixMaxEngine | ( | uint64_t | seed = 1 | ) |
Definition at line 33 of file MixMaxEngine.icc.
|
virtual |
Definition at line 40 of file MixMaxEngine.icc.
|
protected |
Get the counter (between 0 and Size-1)
Definition at line 150 of file MixMaxEngine.icc.
|
protected |
get the state of the generator
Definition at line 139 of file MixMaxEngine.icc.
uint64_t ROOT::Math::MixMaxEngine< N, S >::IntRndm | ( | ) |
generate a 64 bit integer number
Definition at line 101 of file MixMaxEngine.icc.
|
static |
maximum integer that can be generated. For MIXMAX is 2^61-1
Definition at line 109 of file MixMaxEngine.icc.
|
static |
minimum integer that can be generated. For MIXMAX is 0
Definition at line 115 of file MixMaxEngine.icc.
|
static |
get name of the generator
Definition at line 155 of file MixMaxEngine.icc.
|
inline |
generate a double random number (faster interface)
Definition at line 118 of file MixMaxEngine.h.
|
inlinevirtual |
Implements ROOT::Math::TRandomEngine.
Definition at line 115 of file MixMaxEngine.h.
|
private |
implementation function to generate the random number
Definition at line 90 of file MixMaxEngine.icc.
void ROOT::Math::MixMaxEngine< N, S >::RndmArray | ( | int | n, |
double * | array | ||
) |
generate an array of random numbers
Definition at line 121 of file MixMaxEngine.icc.
void ROOT::Math::MixMaxEngine< N, S >::SetSeed | ( | Result_t | seed | ) |
set the generator seed
Definition at line 51 of file MixMaxEngine.icc.
|
protected |
set the full initial generator state
Definition at line 128 of file MixMaxEngine.icc.
|
static |
Get the size of the generator.
Definition at line 145 of file MixMaxEngine.icc.
|
private |
Definition at line 150 of file MixMaxEngine.h.