LatMRG Guide
1.0
A software package to test and search for new linear congruential random number generators
|
This class implements lattice bases built from a Korobov lattice rule. More...
#include <latmrg/KorobovLattice.h>
Public Member Functions | |
KorobovLattice (const Int &n, const Int &a, int maxDim, LatticeTester::NormType norm=LatticeTester::L2NORM) | |
Constructs a Korobov lattice with \(n\) points, maximal dimension maxDim using the norm norm . More... | |
KorobovLattice (const Int &n, const Int &a, int dim, int t, LatticeTester::NormType norm=LatticeTester::L2NORM) | |
Constructor. More... | |
KorobovLattice (const KorobovLattice &Lat) | |
Copy constructor. More... | |
~KorobovLattice () | |
Destructor. More... | |
void | buildBasis (int d) |
Builds the basis in dimension \(d\). More... | |
void | incDim () |
Increments the dimension of the basis by 1. More... | |
void | incDimSlow () |
Increments the dimension of the basis by 1 by rebuilding the basis from scratch. More... | |
KorobovLattice & | operator= (const KorobovLattice &Lat) |
Assigns Lat to this object. More... | |
std::string | toStringCoef () const |
Returns the multiplier \(a\) as a string. More... | |
Protected Member Functions | |
void | init () |
Initialization. More... | |
Protected Attributes | |
Int | m_a |
The multiplier of the Korobov lattice rule. More... | |
int | m_shift |
The shift applied to the lattice rule. More... | |
Private Types | |
typedef NTL::matrix< Int > | IntMat |
This class implements lattice bases built from a Korobov lattice rule.
For a given \(a\), a Korobov lattice basis is formed as follows:
\[ \mathbf{b_1} = (1, a, a^2, …, a^{d-1}),\quad \mathbf{b_2} = (0, n, 0, …, 0),\quad…,\quad \mathbf{b_d} = (0, …, 0, n). \]
incDim
de façon efficace comme dans MRGLattice
|
private |
LatMRG::KorobovLattice< Int, Dbl >::KorobovLattice | ( | const Int & | n, |
const Int & | a, | ||
int | maxDim, | ||
LatticeTester::NormType | norm = LatticeTester::L2NORM |
||
) |
Constructs a Korobov lattice with \(n\) points, maximal dimension maxDim
using the norm norm
.
LatMRG::KorobovLattice< Int, Dbl >::KorobovLattice | ( | const Int & | n, |
const Int & | a, | ||
int | dim, | ||
int | t, | ||
LatticeTester::NormType | norm = LatticeTester::L2NORM |
||
) |
Constructor.
Same as above, except the lattice is formed as follow:
\[ \mathbf{b_1} = (a^t, a^{t+1}, a^{t+2}, …, a^{t+d-1}),\qquad \mathbf{b_2} = (0, n, 0, …, 0),\qquad…,\qquad \mathbf{b_d} = (0, …, 0, n). \]
LatMRG::KorobovLattice< Int, Dbl >::KorobovLattice | ( | const KorobovLattice< Int, Dbl > & | Lat | ) |
Copy constructor.
LatMRG::KorobovLattice< Int, Dbl >::~KorobovLattice | ( | ) |
Destructor.
void LatMRG::KorobovLattice< Int, Dbl >::buildBasis | ( | int | d | ) |
Builds the basis in dimension \(d\).
void LatMRG::KorobovLattice< Int, Dbl >::incDim | ( | ) |
Increments the dimension of the basis by 1.
void LatMRG::KorobovLattice< Int, Dbl >::incDimSlow | ( | ) |
Increments the dimension of the basis by 1 by rebuilding the basis from scratch.
This is very slow. It can be used for verification of the fast incDim
method above.
|
protected |
Initialization.
KorobovLattice< Int, Dbl > & LatMRG::KorobovLattice< Int, Dbl >::operator= | ( | const KorobovLattice< Int, Dbl > & | Lat | ) |
Assigns Lat
to this object.
std::string LatMRG::KorobovLattice< Int, Dbl >::toStringCoef | ( | ) | const |
Returns the multiplier \(a\) as a string.
|
protected |
The multiplier of the Korobov lattice rule.
|
protected |
The shift applied to the lattice rule.