|
LatMRG Online Documentation unknown
Tools to analyze the lattice structure of linear generators
|
This class handles lattices that are produced by linear congruential generators (LCGs). More...
Public Member Functions | |
| LCGLattice (const Int &n, const Int &a, int maxDim, LatticeTester::NormType norm=LatticeTester::L2NORM) | |
| Constructs the lattice for an LCG with modulus m and multiplier a, up to maxDim dimensions, using the norm norm. | |
| LCGLattice (const Int &n, const Int &a, int dim, int t, LatticeTester::NormType norm=LatticeTester::L2NORM) | |
| Same as above, except the lattice is formed as follow: | |
| LCGLattice (const LCGLattice &Lat) | |
| Copy constructor. | |
| LCGLattice & | operator= (const LCGLattice &Lat) |
| Assigns Lat to this object. | |
| ~LCGLattice () | |
| Destructor. | |
| std::string | toStringCoef () const |
| Returns the multiplier \(a\) as a string. | |
| void | buildBasis (int d) |
| Builds the basis in dimension \(d\). | |
| void | incDim () |
| Increments the dimension of the basis by 1. | |
| void | incDimSlow () |
| Increments the dimension of the basis by 1 by rebuilding the basis from scratch. | |
Protected Member Functions | |
| void | init () |
| Initialization. | |
Protected Attributes | |
| Int | m_a |
| The multiplier of the Korobov lattice rule. | |
| int | m_shift |
| The shift applied to the generating vector. | |
This class handles lattices that are produced by linear congruential generators (LCGs).
Those lattices are also handled by LatticeTester::Rank1Lattice.
Note: Everything is in Rank1Lattice except the shifted generating vector, which we can add easily.
| LatMRG::LCGLattice< Int, Real >::LCGLattice | ( | const Int & | n, |
| const Int & | a, | ||
| int | maxDim, | ||
| LatticeTester::NormType | norm = LatticeTester::L2NORM ) |
Constructs the lattice for an LCG with modulus m and multiplier a, up to maxDim dimensions, using the norm norm.
| LatMRG::LCGLattice< Int, Real >::LCGLattice | ( | const Int & | n, |
| const Int & | a, | ||
| int | dim, | ||
| int | t, | ||
| LatticeTester::NormType | norm = LatticeTester::L2NORM ) |
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::LCGLattice< Int, Real >::LCGLattice | ( | const LCGLattice< Int, Real > & | Lat | ) |
Copy constructor.
| LatMRG::LCGLattice< Int, Real >::~LCGLattice | ( | ) |
Destructor.
| LCGLattice< Int, Real > & LatMRG::LCGLattice< Int, Real >::operator= | ( | const LCGLattice< Int, Real > & | Lat | ) |
Assigns Lat to this object.
| std::string LatMRG::LCGLattice< Int, Real >::toStringCoef | ( | ) | const |
Returns the multiplier \(a\) as a string.
| void LatMRG::LCGLattice< Int, Real >::buildBasis | ( | int | d | ) |
Builds the basis in dimension \(d\).
| void LatMRG::LCGLattice< Int, Real >::incDim | ( | ) |
Increments the dimension of the basis by 1.
| void LatMRG::LCGLattice< Int, Real >::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.
|
protected |
The multiplier of the Korobov lattice rule.
|
protected |
The shift applied to the generating vector.