LatMRG Guide  1.0
A software package to test and search for new linear congruential random number generators
LatMRG::KorobovLattice< Int, Dbl > Class Template Reference

This class implements lattice bases built from a Korobov lattice rule. More...

#include <latmrg/KorobovLattice.h>

Inheritance diagram for LatMRG::KorobovLattice< Int, Dbl >:

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

Detailed Description

template<typename Int, typename Dbl>
class LatMRG::KorobovLattice< Int, Dbl >

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). \]

Remarks
Pierre: Reprogrammer incDim de façon efficace comme dans MRGLattice

Member Typedef Documentation

◆ IntMat

template<typename Int , typename Dbl >
typedef NTL::matrix<Int> LatMRG::KorobovLattice< Int, Dbl >::IntMat
private

Constructor & Destructor Documentation

◆ KorobovLattice() [1/3]

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

◆ KorobovLattice() [2/3]

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

◆ KorobovLattice() [3/3]

template<typename Int , typename Dbl >
LatMRG::KorobovLattice< Int, Dbl >::KorobovLattice ( const KorobovLattice< Int, Dbl > &  Lat)

Copy constructor.

◆ ~KorobovLattice()

template<typename Int , typename Dbl >
LatMRG::KorobovLattice< Int, Dbl >::~KorobovLattice ( )

Destructor.

Member Function Documentation

◆ buildBasis()

template<typename Int , typename Dbl >
void LatMRG::KorobovLattice< Int, Dbl >::buildBasis ( int  d)

Builds the basis in dimension \(d\).

◆ incDim()

template<typename Int , typename Dbl >
void LatMRG::KorobovLattice< Int, Dbl >::incDim ( )

Increments the dimension of the basis by 1.

◆ incDimSlow()

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

◆ init()

template<typename Int , typename Dbl >
void LatMRG::KorobovLattice< Int, Dbl >::init ( )
protected

Initialization.

◆ operator=()

template<typename Int , typename Dbl >
KorobovLattice< Int, Dbl > & LatMRG::KorobovLattice< Int, Dbl >::operator= ( const KorobovLattice< Int, Dbl > &  Lat)

Assigns Lat to this object.

◆ toStringCoef()

template<typename Int , typename Dbl >
std::string LatMRG::KorobovLattice< Int, Dbl >::toStringCoef ( ) const

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

Member Data Documentation

◆ m_a

template<typename Int , typename Dbl >
Int LatMRG::KorobovLattice< Int, Dbl >::m_a
protected

The multiplier of the Korobov lattice rule.

◆ m_shift

template<typename Int , typename Dbl >
int LatMRG::KorobovLattice< Int, Dbl >::m_shift
protected

The shift applied to the lattice rule.


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