Logo ROOT   6.07/09
Reference Guide
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Math::MixMaxEngine< N, SkipNumber > Class Template Reference

template<int N, int SkipNumber>
class ROOT::Math::MixMaxEngine< N, SkipNumber >

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>

Inheritance diagram for ROOT::Math::MixMaxEngine< N, SkipNumber >:
[legend]

Member Typedef Documentation

template<int N, int SkipNumber>
typedef TRandomEngine ROOT::Math::MixMaxEngine< N, SkipNumber >::BaseType

Definition at line 86 of file MixMaxEngine.h.

template<int N, int SkipNumber>
typedef uint64_t ROOT::Math::MixMaxEngine< N, SkipNumber >::Result_t

Definition at line 94 of file MixMaxEngine.h.

template<int N, int SkipNumber>
typedef uint64_t ROOT::Math::MixMaxEngine< N, SkipNumber >::StateInt_t

Definition at line 90 of file MixMaxEngine.h.

Constructor & Destructor Documentation

template<int N, int S>
ROOT::Math::MixMaxEngine< N, S >::MixMaxEngine ( uint64_t  seed = 1)

Definition at line 33 of file MixMaxEngine.icc.

template<int N, int S>
ROOT::Math::MixMaxEngine< N, S >::~MixMaxEngine ( )
virtual

Definition at line 40 of file MixMaxEngine.icc.

Member Function Documentation

template<int N, int S>
int ROOT::Math::MixMaxEngine< N, S >::Counter ( ) const
protected

Get the counter (between 0 and Size-1)

Definition at line 150 of file MixMaxEngine.icc.

template<int N, int S>
void ROOT::Math::MixMaxEngine< N, S >::GetState ( std::vector< StateInt_t > &  state) const
protected

get the state of the generator

Definition at line 139 of file MixMaxEngine.icc.

template<int N, int S>
uint64_t ROOT::Math::MixMaxEngine< N, S >::IntRndm ( )

generate a 64 bit integer number

Definition at line 101 of file MixMaxEngine.icc.

template<int N, int S>
uint64_t ROOT::Math::MixMaxEngine< N, S >::MaxInt ( )
static

maximum integer that can be generated. For MIXMAX is 2^61-1

Definition at line 109 of file MixMaxEngine.icc.

template<int N, int S>
uint64_t ROOT::Math::MixMaxEngine< N, S >::MinInt ( )
static

minimum integer that can be generated. For MIXMAX is 0

Definition at line 115 of file MixMaxEngine.icc.

template<int N, int S>
std::string ROOT::Math::MixMaxEngine< N, S >::Name ( )
static

get name of the generator

Definition at line 155 of file MixMaxEngine.icc.

template<int N, int SkipNumber>
double ROOT::Math::MixMaxEngine< N, SkipNumber >::operator() ( )
inline

generate a double random number (faster interface)

Definition at line 118 of file MixMaxEngine.h.

template<int N, int SkipNumber>
virtual double ROOT::Math::MixMaxEngine< N, SkipNumber >::Rndm ( )
inlinevirtual

Implements ROOT::Math::TRandomEngine.

Definition at line 115 of file MixMaxEngine.h.

template<int N, int S>
double ROOT::Math::MixMaxEngine< N, S >::Rndm_impl ( )
private

implementation function to generate the random number

Definition at line 90 of file MixMaxEngine.icc.

template<int N, int S>
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.

template<int N, int S>
void ROOT::Math::MixMaxEngine< N, S >::SetSeed ( Result_t  seed)

set the generator seed

Definition at line 51 of file MixMaxEngine.icc.

template<int N, int S>
void ROOT::Math::MixMaxEngine< N, S >::SetState ( const std::vector< StateInt_t > &  state)
protected

set the full initial generator state

Definition at line 128 of file MixMaxEngine.icc.

template<int N, int S>
int ROOT::Math::MixMaxEngine< N, S >::Size ( )
static

Get the size of the generator.

Definition at line 145 of file MixMaxEngine.icc.

Member Data Documentation

template<int N, int SkipNumber>
MixMaxEngineImpl<N>* ROOT::Math::MixMaxEngine< N, SkipNumber >::fRng
private

Definition at line 150 of file MixMaxEngine.h.


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