Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
4e5cae5a
Commit
4e5cae5a
authored
5 years ago
by
Olivier Couet
Browse files
Options
Downloads
Patches
Plain Diff
Reformat MixMaxEngine doc.
parent
62186e11
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
math/mathcore/inc/Math/MixMaxEngine.h
+69
-80
69 additions, 80 deletions
math/mathcore/inc/Math/MixMaxEngine.h
with
69 additions
and
80 deletions
math/mathcore/inc/Math/MixMaxEngine.h
+
69
−
80
View file @
4e5cae5a
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* *
* *
**********************************************************************/
**********************************************************************/
// random engines based on ROOT
// random engines based on ROOT
#ifndef ROOT_Math_MixMaxEngine
#ifndef ROOT_Math_MixMaxEngine
#define ROOT_Math_MixMaxEngine
#define ROOT_Math_MixMaxEngine
...
@@ -24,91 +24,80 @@
...
@@ -24,91 +24,80 @@
// typedef struct rng_state_st rng_state_t;
// typedef struct rng_state_st rng_state_t;
// namespace mixmax {
// namespace mixmax {
// template<int Ndim>
// template<int Ndim>
// class mixmax_engine;
// class mixmax_engine;
// }
// }
namespace
ROOT
{
namespace
ROOT
{
namespace
Math
{
namespace
Math
{
template
<
int
N
>
template
<
int
N
>
class
MixMaxEngineImpl
;
class
MixMaxEngineImpl
;
/**
/**
MixMaxEngine is a wrapper class for the MIXMAX Random number generator.
MixMaxEngine is a wrapper class for the MIXMAX Random number generator.
MIXMAX is a matrix-recursive random number generator introduced by
MIXMAX is a matrix-recursive random number generator introduced by
G. Savvidy.
G. Savvidy.
The real implementation of the generator, written in C, is in the mixmax.h and mixmax.cxx files.
The real implementation of the generator, written in C, is in the mixmax.h and mixmax.cxx files.
This generator code is available also at hepforge: http://mixmax.hepforge.org
This generator code is available also at hepforge: http://mixmax.hepforge.org
The MIXMAX code has been created and developed by Konstantin Savvidy and it is
The MIXMAX code has been created and developed by Konstantin Savvidy and it is
released under GNU Lesser General Public License v3.
released under GNU Lesser General Public License v3.
This wrapper class provides 3 different variants of MIXMAX according to the template para extra parameter N.
This wrapper class provides 3 different variants of MIXMAX according to the template para extra parameter N.
The extra parameter, `SkipNumber`, is used to perform additional iterations of the generator before returning the random numbers.
The extra parameter, `SkipNumber`, is used to perform additional iterations of the generator before returning the random numbers.
For example, when `SkipNumber = 2`, the generator will have two extra iterations that will be discarder.
For example, when `SkipNumber = 2`, the generator will have two extra iterations that will be discarder.
* MIXMAX with N = 240. This is a new version of the generator (version 2.0beta) described in the
- MIXMAX with N = 240. This is a new version of the generator (version 2.0beta) described in the
<a href="http://dx.doi.org/10.1016/j.chaos.2016.05.003">2016 paper</a> (3rd reference), with
<a href="http://dx.doi.org/10.1016/j.chaos.2016.05.003">2016 paper</a> (3rd reference), with
special number $s=487013230256099140$, $m=2^{51}+1$ and having a period of $10^{4389}$.
special number \f$s=487013230256099140\f$, \f$m=2^{51}+1\f$ and having a period of \f$10^{4389}\f$.
* MIXMAX with N = 17, from the 2.0beta version with $s=0$ and $m=2^{36}+1$. The period of the generator is $10^{294}$.
- MIXMAX with N = 17, from the 2.0 beta version with \f$s=0\f$ and \f$m=2^{36}+1\f$. The period of the
generator is \f$10^{294}\f$.
* MIXMAX with N = 256 from the 1.0 version. The period is (for `SkipNumber=0`) $10^{4682}$.
For this generator we recommend in ROOT using a default value of `SkipNumber=2, while for the previous two generators
- MIXMAX with N = 256 from the 1.0 version. The period is (for `SkipNumber=0`) \f$10^{4682}\f$.
skipping is not needed.
For this generator we recommend in ROOT using a default value of `SkipNumber=2, while for the
previous two generators skipping is not needed.
This table describes the properties of the MIXMAX generators. MIXMAX is a genuine 61 bit generator on the Galois field GF[p], where
$p=2^{61}-1$ is the Mersenne prime number.
This table describes the properties of the MIXMAX generators. MIXMAX is a genuine 61 bit
The MIXMAX generators with these parameters pass all of the BigCrush
generator on the Galois field GF[p], where \f$p=2^{61}-1\f$ is the Mersenne prime number.
tests in the <a href="http://simul.iro.umontreal.ca/testu01/tu01.html">TestU01 suite</a\>.
The MIXMAX generators with these parameters pass all of the BigCrush
tests in the [TestU01 suite](http://simul.iro.umontreal.ca/testu01/tu01.html)
\latexonly
\begin{table}[h]
\centering
\begin{tabular}{@{} rrlcrr @{}}
| Dimension | Entropy | Decorrelation Time | Iteration Time | Relaxation Time | Period q |
|-----------|-------------|----------------------------------|-----------------|---------------------------------------------------|-------------------------------------|
\toprule
| N | \f$~h(T)\f$ | \f$\tau_0 = {1\over h(T) 2N }\f$ | t | \f$\tau ={1\over h(T) \ln {1\over \delta v_0}}\f$ | \f$\log_{10} (q)\f$ |
Dimension &~ Entropy & Decorrelation Time & Iteration Time & Relaxation Time &Period q\\
| 256 | 194 | 0.000012 | 1 | 95.00 | 4682 (full period is not confirmed) |
N &~~ $~h(T)$ &~~~ $\tau_0 = {1\over h(T) 2N }$ & t & $\tau ={1\over h(T) \ln {1\over \delta v_0}}$ & $ \log_{10} (q)$ \\ % Crush
| 8 | 220 | 0.00028 | 1 | 1.54 | 129 |
\midrule
| 17 | 374 | 0.000079 | 1 | 1.92 | 294 |
256 & 194 & ~~~~~0.000012 & 1 & 95.00 & 4682\footnote{full
| 240 | 8679 | 0.00000024 | 1 | 1.17 | 4389 |
period is not confirmed} \\
\hline
8 & 220 & $~~~~~0.00028$ & 1 & 1.54 & 129 \\
The entropy \f$h(T)\f$, decorrelation time \f$\tau_0\f$ decorrelation time, relaxation
17 & 374 & ~~~~~0.000079 & 1 & 1.92 & 294 \\
time \f$\tau\f$ and period of the MIXMAX generator, expressed in units of the iteration
240 & 8679 & ~~~~~0.00000024 & 1 & 1.17 & 4389 \\
time \f$t\f$, which is normalised to 1. Clearly \f$\tau_0~ < t ~< \tau\f$.
\bottomrule
\end{tabular}
#### The References for MIXMAX are:
\caption{The entropy $h(T)$, decorrelation time $\tau_0$
decorrelation time, relaxation time $\tau $ and period of the MIXMAX generator
- G.K.Savvidy and N.G.Ter-Arutyunian, *On the Monte Carlo simulation of physical systems,
\cite{savvidy2017ex,savvidy2017cl},
J.Comput.Phys. 97, 566 (1991)*;
expressed in units of the iteration time $t$, which is
Preprint EPI-865-16-86, Yerevan, Jan. 1986
normalised to 1.
Clearly $\tau_0~ < t ~< \tau $.
- K.Savvidy, *The MIXMAX random number generator*,
}
Comp. Phys. Commun. 196 (2015), pp 161–165
\end{table}
http://dx.doi.org/10.1016/j.cpc.2015.06.003
\endlatexonly
- K.Savvidy and G.Savvidy, *Spectrum and Entropy of C-systems MIXMAX Random Number Generator*,
The References for MIXMAX are
Chaos, Solitons & Fractals, Volume 91, (2016) pp. 33–38
http://dx.doi.org/10.1016/j.chaos.2016.05.003
* 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
@ingroup Random
*/
* 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
@ingroup Random
*/
template
<
int
N
,
int
SkipNumber
>
template
<
int
N
,
int
SkipNumber
>
class
MixMaxEngine
:
public
TRandomEngine
{
class
MixMaxEngine
:
public
TRandomEngine
{
...
@@ -180,13 +169,13 @@ namespace ROOT {
...
@@ -180,13 +169,13 @@ namespace ROOT {
//rng_state_t * fRngState; // mix-max generator state
//rng_state_t * fRngState; // mix-max generator state
//mixmax::mixmax_engine<N> * fRng; // mixmax internal engine class
//mixmax::mixmax_engine<N> * fRng; // mixmax internal engine class
MixMaxEngineImpl
<
N
>
*
fRng
;
// mixmax internal engine class
MixMaxEngineImpl
<
N
>
*
fRng
;
// mixmax internal engine class
};
};
typedef
MixMaxEngine
<
240
,
0
>
MixMaxEngine240
;
typedef
MixMaxEngine
<
240
,
0
>
MixMaxEngine240
;
typedef
MixMaxEngine
<
256
,
2
>
MixMaxEngine256
;
typedef
MixMaxEngine
<
256
,
2
>
MixMaxEngine256
;
typedef
MixMaxEngine
<
17
,
0
>
MixMaxEngine17
;
typedef
MixMaxEngine
<
17
,
0
>
MixMaxEngine17
;
extern
template
class
MixMaxEngine
<
240
,
0
>;
extern
template
class
MixMaxEngine
<
240
,
0
>;
extern
template
class
MixMaxEngine
<
256
,
0
>;
extern
template
class
MixMaxEngine
<
256
,
0
>;
extern
template
class
MixMaxEngine
<
256
,
2
>;
extern
template
class
MixMaxEngine
<
256
,
2
>;
...
@@ -202,4 +191,4 @@ namespace ROOT {
...
@@ -202,4 +191,4 @@ namespace ROOT {
#include
"Math/MixMaxEngine.icc"
#include
"Math/MixMaxEngine.icc"
#endif
/* ROOT_Math_MixMaxEngine */
#endif
/* ROOT_Math_MixMaxEngine */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment