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

Public Member Functions

 MMRGLattice (const Int &m, const IntMat &A, int maxDim, LatticeTester::NormType norm=LatticeTester::L2NORM, LatticeType lat=FULL)
 Constructor with modulus of congruence \(m\), order of the recurrence \(k\), multipliers in aa, and maximal dimension maxDim.
 MMRGLattice (const Int &m, const IntMat &A, int maxDim, LacunaryType &lacunaryType, IntVec &lac, LatticeTester::NormType norm=LatticeTester::L2NORM, LatticeType lat=FULL)
 As in the constructor above but the basis is built for the lacunary indices lac.
 MMRGLattice (const MMRGLattice< Int, Real > &Lat)
 Copy constructor.
 ~MMRGLattice ()
 Destructor.
void kill ()
 Cleans and releases memory used by this object.
MMRGLattice< Int, Real > & operator= (const MMRGLattice< Int, Real > &Lat)
 Assigns Lat to this object.
Int & getLac (int j)
 Returns the \(j\)-th lacunary index.
virtual void setLac (const LatticeTester::Lacunary< Int > &lat)
 Sets the lacunary indices for this lattice to lat.
std::string toString () const
 Returns the generator matrix \(A\) as a string.
void buildBasis (int64_t d) override
 Builds the basis in dimension \(d\).
void incDimBasis () override
 Increments the dimension of the basis by 1 by calling either incDimBasis or incDimLaBasis.
void setB (IntMat B)
 Sets the matrix B.
bool isLacunary () const
 Returns true for the case of lacunary indices, returns false for non-lacunary indices.
const IntMat & getGeneratorMatrix () const
 Returns a non-mutable copy of the generator matrix of the MMRG.
void getSubLine (IntVec &vec, IntMat &B, int lign, int jMin, int jMax)

Protected Member Functions

void init ()
 Initializes some of the local variables.
void buildNonLacunaryBasis (int d)
 Builds the basis of the MMRG recurrence in case of non-lacunary indices.
void buildLacunaryBasis (int dimension)
 Builds the basis of the MMRG recurrence in case of lacunary indices.
void incrementDimNonLacunaryBasis ()
 Increments the basis by 1 in case of non-lacunary indices.
void incrementDimLacunaryBasis (int Imax)
 Increments the basis by 1 in case of lacunary indices.

Protected Attributes

IntMat m_A
 The generator matrix of the recurrence.
IntMat m_basis_max
 Basis that is always of a dimension that is a multiple of the order and that is always of a greater or equal dimension than the current basis.
LatticeType m_latType
 Indicates which lattice or sublattice is analyzed.
bool m_lacunaryFlag
 Is true in the case of lacunary indices, false otherwise.
LacunaryType m_lacunaryType
 Type of the lacunary projection selected.
LatticeTester::Lacunary< Int > m_lac
 Contains the lacunary indices when LacunaryFlag is true, otherwise is undefined.
int m_numberLacIndices
 Contains the number of lacunary indices.
IntMat m_B
 Matrix used for lacunary indices.

Detailed Description

template<typename Int, typename Real>
class LatMRG::MMRGLattice< Int, Real >
Todo
Make this class not use/compute the dual if not asked.

This class implements lattice basis built from M-MRG (matrix multiple recursive linear congruential generators). One must first call the constructor with a given congruence modulus \(m\), a given generator matrix for the recurrence, and a maximal dimension for the basis. One must then build the lattice basis associated to the generator matrix for a given dimension. Each MMRG is defined by a generator matrix \(A\). This MMRG satisfies the recurrence

\[ X_n = A X_{n-1} \mod m. \]

Constructor & Destructor Documentation

◆ MMRGLattice() [1/3]

template<typename Int, typename Real>
LatMRG::MMRGLattice< Int, Real >::MMRGLattice ( const Int & m,
const IntMat & A,
int maxDim,
LatticeTester::NormType norm = LatticeTester::L2NORM,
LatticeType lat = FULL )

Constructor with modulus of congruence \(m\), order of the recurrence \(k\), multipliers in aa, and maximal dimension maxDim.

The length of basis vectors is computed with norm. The basis is built for the lacunary indices in lac. The vector aa must have k+1 components with a[j]= \(a_j\).

◆ MMRGLattice() [2/3]

template<typename Int, typename Real>
LatMRG::MMRGLattice< Int, Real >::MMRGLattice ( const Int & m,
const IntMat & A,
int maxDim,
LacunaryType & lacunaryType,
IntVec & lac,
LatticeTester::NormType norm = LatticeTester::L2NORM,
LatticeType lat = FULL )

As in the constructor above but the basis is built for the lacunary indices lac.

◆ MMRGLattice() [3/3]

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

Copy constructor.

The maximal dimension of the created basis is set equal to Lat’s current dimension.

◆ ~MMRGLattice()

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

Destructor.

Member Function Documentation

◆ kill()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::kill ( )

Cleans and releases memory used by this object.

◆ operator=()

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

Assigns Lat to this object.

The maximal dimension of this basis is set equal to Lat’s current dimension.

◆ getLac()

template<typename Int, typename Real>
Int & LatMRG::MMRGLattice< Int, Real >::getLac ( int j)

Returns the \(j\)-th lacunary index.

◆ setLac()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::setLac ( const LatticeTester::Lacunary< Int > & lat)
virtual

Sets the lacunary indices for this lattice to lat.

◆ toString()

template<typename Int, typename Real>
std::string LatMRG::MMRGLattice< Int, Real >::toString ( ) const

Returns the generator matrix \(A\) as a string.

◆ buildBasis()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::buildBasis ( int64_t d)
override

Builds the basis in dimension \(d\).

◆ incDimBasis()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::incDimBasis ( )
override

Increments the dimension of the basis by 1 by calling either incDimBasis or incDimLaBasis.

◆ setB()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::setB ( IntMat B)
inline

Sets the matrix B.

◆ isLacunary()

template<typename Int, typename Real>
bool LatMRG::MMRGLattice< Int, Real >::isLacunary ( ) const
inline

Returns true for the case of lacunary indices, returns false for non-lacunary indices.

◆ getGeneratorMatrix()

template<typename Int, typename Real>
const IntMat & LatMRG::MMRGLattice< Int, Real >::getGeneratorMatrix ( ) const
inline

Returns a non-mutable copy of the generator matrix of the MMRG.

◆ getSubLine()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::getSubLine ( IntVec & vec,
IntMat & B,
int lign,
int jMin,
int jMax )

◆ init()

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

Initializes some of the local variables.

◆ buildNonLacunaryBasis()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::buildNonLacunaryBasis ( int d)
protected

Builds the basis of the MMRG recurrence in case of non-lacunary indices.

◆ buildLacunaryBasis()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::buildLacunaryBasis ( int dimension)
protected

Builds the basis of the MMRG recurrence in case of lacunary indices.

◆ incrementDimNonLacunaryBasis()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::incrementDimNonLacunaryBasis ( )
protected

Increments the basis by 1 in case of non-lacunary indices.

◆ incrementDimLacunaryBasis()

template<typename Int, typename Real>
void LatMRG::MMRGLattice< Int, Real >::incrementDimLacunaryBasis ( int Imax)
protected

Increments the basis by 1 in case of lacunary indices.

Member Data Documentation

◆ m_A

template<typename Int, typename Real>
IntMat LatMRG::MMRGLattice< Int, Real >::m_A
protected

The generator matrix of the recurrence.

◆ m_basis_max

template<typename Int, typename Real>
IntMat LatMRG::MMRGLattice< Int, Real >::m_basis_max
protected

Basis that is always of a dimension that is a multiple of the order and that is always of a greater or equal dimension than the current basis.

This is used by buildBasis() and incDim() so that powers of A do not have to be computed every time.

◆ m_latType

template<typename Int, typename Real>
LatticeType LatMRG::MMRGLattice< Int, Real >::m_latType
protected

Indicates which lattice or sublattice is analyzed.

◆ m_lacunaryFlag

template<typename Int, typename Real>
bool LatMRG::MMRGLattice< Int, Real >::m_lacunaryFlag
protected

Is true in the case of lacunary indices, false otherwise.

◆ m_lacunaryType

template<typename Int, typename Real>
LacunaryType LatMRG::MMRGLattice< Int, Real >::m_lacunaryType
protected

Type of the lacunary projection selected.

◆ m_lac

template<typename Int, typename Real>
LatticeTester::Lacunary<Int> LatMRG::MMRGLattice< Int, Real >::m_lac
protected

Contains the lacunary indices when LacunaryFlag is true, otherwise is undefined.

◆ m_numberLacIndices

template<typename Int, typename Real>
int LatMRG::MMRGLattice< Int, Real >::m_numberLacIndices
protected

Contains the number of lacunary indices.

◆ m_B

template<typename Int, typename Real>
IntMat LatMRG::MMRGLattice< Int, Real >::m_B
protected

Matrix used for lacunary indices.


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