LatMRG Online Documentation unknown
Tools to analyze the lattice structure of linear generators
|
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. |
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. \]
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\).
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.
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.
LatMRG::MMRGLattice< Int, Real >::~MMRGLattice | ( | ) |
Destructor.
void LatMRG::MMRGLattice< Int, Real >::kill | ( | ) |
Cleans and releases memory used by this object.
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.
Int & LatMRG::MMRGLattice< Int, Real >::getLac | ( | int | j | ) |
Returns the \(j\)-th lacunary index.
|
virtual |
Sets the lacunary indices for this lattice to lat.
std::string LatMRG::MMRGLattice< Int, Real >::toString | ( | ) | const |
Returns the generator matrix \(A\) as a string.
|
override |
Builds the basis in dimension \(d\).
|
override |
Increments the dimension of the basis by 1 by calling either incDimBasis or incDimLaBasis.
|
inline |
Sets the matrix B.
|
inline |
Returns true for the case of lacunary indices, returns false for non-lacunary indices.
|
inline |
Returns a non-mutable copy of the generator matrix of the MMRG.
void LatMRG::MMRGLattice< Int, Real >::getSubLine | ( | IntVec & | vec, |
IntMat & | B, | ||
int | lign, | ||
int | jMin, | ||
int | jMax ) |
|
protected |
Initializes some of the local variables.
|
protected |
Builds the basis of the MMRG recurrence in case of non-lacunary indices.
|
protected |
Builds the basis of the MMRG recurrence in case of lacunary indices.
|
protected |
Increments the basis by 1 in case of non-lacunary indices.
|
protected |
Increments the basis by 1 in case of lacunary indices.
|
protected |
The generator matrix of the recurrence.
|
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.
|
protected |
Indicates which lattice or sublattice is analyzed.
|
protected |
Is true in the case of lacunary indices, false otherwise.
|
protected |
Type of the lacunary projection selected.
|
protected |
Contains the lacunary indices when LacunaryFlag is true, otherwise is undefined.
|
protected |
Contains the number of lacunary indices.
|
protected |
Matrix used for lacunary indices.