LatMRG Online Documentation unknown
Tools to analyze the lattice structure of linear generators
Loading...
Searching...
No Matches
LatMRG::LCGLattice< Int, Real > Class Template Reference

This class handles lattices that are produced by linear congruential generators (LCGs). More...

Inheritance diagram for LatMRG::LCGLattice< Int, Real >:

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.
LCGLatticeoperator= (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.

Detailed Description

template<typename Int, typename Real>
class LatMRG::LCGLattice< Int, Real >

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.

Constructor & Destructor Documentation

◆ LCGLattice() [1/3]

template<typename Int, typename Real>
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.

◆ LCGLattice() [2/3]

template<typename Int, typename Real>
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). \]

◆ LCGLattice() [3/3]

template<typename Int, typename Real>
LatMRG::LCGLattice< Int, Real >::LCGLattice ( const LCGLattice< Int, Real > & Lat)

Copy constructor.

◆ ~LCGLattice()

template<typename Int, typename Real>
LatMRG::LCGLattice< Int, Real >::~LCGLattice ( )

Destructor.

Member Function Documentation

◆ operator=()

template<typename Int, typename Real>
LCGLattice< Int, Real > & LatMRG::LCGLattice< Int, Real >::operator= ( const LCGLattice< Int, Real > & Lat)

Assigns Lat to this object.

◆ toStringCoef()

template<typename Int, typename Real>
std::string LatMRG::LCGLattice< Int, Real >::toStringCoef ( ) const

Returns the multiplier \(a\) as a string.

◆ buildBasis()

template<typename Int, typename Real>
void LatMRG::LCGLattice< Int, Real >::buildBasis ( int d)

Builds the basis in dimension \(d\).

◆ incDim()

template<typename Int, typename Real>
void LatMRG::LCGLattice< Int, Real >::incDim ( )

Increments the dimension of the basis by 1.

◆ incDimSlow()

template<typename Int, typename Real>
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.

◆ init()

template<typename Int, typename Real>
void LatMRG::LCGLattice< Int, Real >::init ( )
protected

Initialization.

Member Data Documentation

◆ m_a

template<typename Int, typename Real>
Int LatMRG::LCGLattice< Int, Real >::m_a
protected

The multiplier of the Korobov lattice rule.

◆ m_shift

template<typename Int, typename Real>
int LatMRG::LCGLattice< Int, Real >::m_shift
protected

The shift applied to the generating vector.


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