Lattice Tester Online Documentation unknown
Software Package For Testing The Uniformity Of Integral Lattices In The Real Space
|
This abstract class extends IntLattice with additional (virtual) methods that must be implemented in subclasses that define specific types of lattices. More...
Public Member Functions | |
IntLatticeExt (int64_t maxDim, NormType norm=L2NORM) | |
A constructor that reserves the space for the primal and m-dual bases and vector lengths, but does not initialize them. | |
IntLatticeExt (Int m, int64_t maxDim, NormType norm=L2NORM) | |
virtual | ~IntLatticeExt () |
Destructor. | |
virtual void | buildBasis (int64_t dim) |
This virtual method builds a basis for the lattice in dim dimensions, and store it in the upper-left part of the internal m_basis variable, which is assumed to be an IntMat object of dimensions maxDim x maxDim. | |
virtual void | buildDualBasis (int64_t dim) |
Similar to buildBasis, but builds only the m-dual basis, in dim dimensions. | |
virtual void | incDimBasis () |
Increments the dimension dim of the basis by one. | |
virtual void | incDimDualBasis () |
Similar to incDimBasis. | |
Public Member Functions inherited from LatticeTester::IntLattice< Int, Real > | |
IntLattice (const int64_t maxDim, NormType norm=L2NORM) | |
Constructs an IntLattice object that can hold a basis in up to maxDim dimensions, with the specified norm type. | |
IntLattice (const Int m, const int64_t maxDim, NormType norm=L2NORM) | |
Constructs a lattice whose basis is uninitialized, in maxDim dimensions, with the scaling factor m and specified norm type. | |
IntLattice (const IntMat basis, const Int m, const int64_t maxDim, NormType norm=L2NORM) | |
Similar to the previous constructor, except that the primal basis is given in basis, which must be an IntMat object of size maxDim by maxDim. | |
IntLattice (const IntMat primalbasis, const IntMat dualbasis, const Int m, const int64_t maxDim, NormType norm=L2NORM) | |
Constructs a lattice with the given basis and given m-dual basis for the given m, in maxDim dimensions, and with the specified norm type. | |
virtual | ~IntLattice () |
Destructor. | |
void | setModulus (const Int m) |
Sets the scaling factor m. | |
void | setBasis (const IntMat basis, const Int m, const int64_t dim, NormType norm=L2NORM) |
Changes the basis to 'basis', the modulus to 'm', and the current dimension to 'dim'. | |
void | setBasis (const IntMat basis, const int64_t dim) |
Changes only the 'basis' and the current dimension to 'dim'. | |
void | setDualBasis (const IntMat dualbasis, const int64_t dimdual) |
Changes only the dual basis to dualbasis and its current dimension to 'dimdual'. | |
void | setDim (const int64_t dim) |
Sets the dimension of the primal basis to dim. | |
void | setDimDual (const int64_t dim) |
Sets the dimension of the m-dual basis to dim. | |
void | setNormType (const NormType &norm) |
Sets the NormType used by this lattice to norm. | |
void | setVecNorm (const Real &value, const int64_t &i) |
Sets the norm of the i-th component of the basis to value, which is assumed to be the correct value. | |
void | setDualVecNorm (const Real &value, const int64_t &i) |
Sets the norm of the i-th component of the m-dual basis to value, which is assumed to be the correct value. | |
void | setNegativeNorm () |
Sets to -1 the first dim values in the array containing the norms of the basis vectors, where dim is the current dimension of the lattice. | |
void | setNegativeNorm (const int64_t &i) |
Sets the value of the i-th component in the array containing the norms of the basis vectors to -1. | |
void | setDualNegativeNorm () |
Sets all the values in the array containing the norms of the dual basis vectors to -1, to indicate that these norms are no longer up to date. | |
void | setDualNegativeNorm (const int64_t &i) |
Sets the value of the i-th component in the array containing the norms of the m-dual basis vectors to -1. | |
Int | getModulus () const |
Returns the scaling factor m. | |
int64_t | getMaxDim () const |
Returns the maximal dimension for this lattice. | |
IntMat & | getBasis () |
Returns the IntMat object that contains the basis of this lattice. | |
IntMat & | getDualBasis () |
Returns the m-dual basis represented in a matrix. | |
int64_t | getDim () const |
Returns the current dimension of the primal lattice, which should be the dimension of the basis vectors and also the number of independent vectors in the basis. | |
int64_t | getDimDual () const |
Returns the current dimension of the m-dual lattice. | |
NormType | getNormType () const |
Returns the NormType used by this lattice. | |
Real | getVecNorm (const int64_t &i) |
Returns the norm (squared in case of the L^2 norm) of the i-th vector of the basis, with the index i starting at 0. | |
RealVec | getVecNorm () const |
Returns the norm (squared in case of the L^2 norm) of each basis vector, in a vector. | |
Real | getDualVecNorm (const int64_t &i) |
Returns the norm (squared in case of the L^2 norm) of the i-th vector of the m-dual basis. | |
RealVec | getDualVecNorm () const |
Returns the norm (squared in case of the L^2 norm) of each vector of the m-dual basis, in a vector. | |
void | updateVecNorm () |
Updates the array containing the norms of the basis vectors by recomputing them. | |
void | updateVecNorm (const int64_t &d) |
Updates the array containing the norm of the basis vectors from the d-th component to the last, by recomputing them. | |
void | updateSingleVecNorm (const int64_t &d, const int64_t &c) |
Updates the 'd'-th entry of the array containing the basis vectors norms. | |
void | updateDualVecNorm () |
Updates the array containing the m-dual basis vectors norms by recomputing them. | |
void | updateSingleDualVecNorm (const int64_t &d, const int64_t &c) |
Updates the 'd'-th entry of the array containing the m-dual basis vectors norms. | |
void | updateDualVecNorm (const int64_t &d) |
Updates the array containing the m-dual basis vectors norms from the d-th component to the last by recomputing them. | |
void | updateDualVecNorm (const int64_t &d, const int64_t &c) |
Updates the array containing the m-dual basis vectors norms from the d-th component to the last by recomputing them. | |
void | updateScalL2Norm (const int64_t i) |
Updates the i-th value of the array containing the square norms of the basis vectors by recomputing it using the L2NORM. | |
void | updateScalL2Norm (const int64_t k1, const int64_t k2) |
Updates the k1-th to the k2-1-th values of the array containing the square norms of the basis vectors by recomputing them using the L2NORM. | |
void | updateDualScalL2Norm (const int64_t i) |
Updates the i-th value of the array containing the square norms of the m-dual basis vectors by recomputing it using the L2NORM. | |
void | updateDualScalL2Norm (const int64_t k1, const int64_t k2) |
Updates the k1-th to the k2-1-th values of the array containing the square norms of the m-dual basis vectors by recomputing them using the L2NORM. | |
void | permute (int64_t i, int64_t j) |
Exchanges vectors i and j in the basis. | |
void | permuteDual (int64_t i, int64_t j) |
Exchanges vectors i and j in the m-dual basis without changing the primal. | |
void | dualize () |
Exchanges the references to the primal and m-dual bases, the references to their vectors of norms, and their dimensions. | |
bool | checkDuality () |
Returns true iff the m-dual basis contained in the object really is the m-dual of the current primal basis. | |
void | sortBasis (int64_t d) |
Sorts the primal basis vectors with indices greater of equal to d by increasing length. | |
void | sortDualBasis (int64_t d) |
Sorts the m-dual basis vectors with indices greater of equal to d by increasing length. | |
virtual void | buildProjectionLLL (IntLattice< Int, Real > &projLattice, const Coordinates &coordSet, double delta=0.5) |
Constructs a set of generating vectors for the projection of the present lattice, over the set of coordinates determined by coordSet, and builds a basis for that projection using an LLL procedure from BasisConstruction. | |
virtual void | buildProjection (IntLattice< Int, Real > &projLattice, const Coordinates &coordSet) |
Builds a basis for the projection of the present lattice over the set of coordinates determined by coordSet. | |
virtual void | buildProjectionDual (IntLattice< Int, Real > &projLattice, const Coordinates &coordSet) |
Similar to buildProjection, except that it builds a basis for the $m$-dual of the projection. | |
std::string | toStringBasis () const |
Returns a string that contains the primal basis vectors and their norms. | |
std::string | toStringDualBasis () const |
Returns a string with the m-dual basis vectors and their norms. | |
std::string | toString () const |
Returns a string that represents this lattice and its parameters. |
Protected Member Functions | |
virtual void | kill () |
Additional Inherited Members | |
Protected Attributes inherited from LatticeTester::IntLattice< Int, Real > | |
Int | m_modulo |
The scaling factor m used for rescaling the lattice. | |
int64_t | m_maxDim |
The maximal dimension for this lattice. | |
int64_t | m_dim |
The current dimension of the primal basis, which is the number of (independent) vectors in it. | |
int64_t | m_dimdual |
The current dimension of the m-dual basis, which is the number of (independent) vectors in its basis. | |
IntMat | m_basis |
The rows of the m_dim x m_dim upper left corner of this matrix are the primal basis vectors. | |
IntMat | m_dualbasis |
The rows of the m_dim x m_dim upper left corner this matrix are the m-dual basis vectors. | |
NormType | m_norm |
The NormType used to measure the vector lengths for this lattice. | |
RealVec | m_vecNorm |
A vector that stores the norm of each basis vector. | |
RealVec | m_dualvecNorm |
Similar to vecNorm, but for the m-dual basis. |
This abstract class extends IntLattice with additional (virtual) methods that must be implemented in subclasses that define specific types of lattices.
These virtual methods permit one to construct a basis and/or an m-dual basis of the lattice and to extend the current basis and/or its m-dual by one coordinate. The IntLattice base class already implements methods to construct a basis and/or an m-dual basis for the projection of the full lattice on a subset of coordinates indices specified by a Coordinates object. These general default implementations are often overridden in subclasses by faster specialized implementations.
Recall that the lattices in IntLattice (and here) have dim <= maxDim dimensions and the bases are stored in IntMat objects of dimensions maxDim x maxDim.
LatticeTester::IntLatticeExt< Int, Real >::IntLatticeExt | ( | int64_t | maxDim, |
NormType | norm = L2NORM ) |
A constructor that reserves the space for the primal and m-dual bases and vector lengths, but does not initialize them.
The maximal dimension of the lattice is set to maxDim, and the norm type is set to norm. In the second version, the scaling factor for the integer coordinates is set to m.
LatticeTester::IntLatticeExt< Int, Real >::IntLatticeExt | ( | Int | m, |
int64_t | maxDim, | ||
NormType | norm = L2NORM ) |
|
virtual |
Destructor.
Depends on the specific subclass.
|
inlinevirtual |
This virtual method builds a basis for the lattice in dim dimensions, and store it in the upper-left part of the internal m_basis variable, which is assumed to be an IntMat object of dimensions maxDim x maxDim.
The parameter dim must not exceed maxDim.
Reimplemented in LatticeTester::Rank1Lattice< Int, Real >.
|
inlinevirtual |
Similar to buildBasis, but builds only the m-dual basis, in dim dimensions.
This dim must not exceed maxDim.
Reimplemented in LatticeTester::Rank1Lattice< Int, Real >.
|
inlinevirtual |
Increments the dimension dim of the basis by one.
One coordinate is added to each basis vector and one new basis vector is added as well. Usually, the other coordinates are left unchanged.
Reimplemented in LatticeTester::Rank1Lattice< Int, Real >.
|
inlinevirtual |
Similar to incDimBasis.
Increments the dimension dim by 1, but only for the dual basis.
Reimplemented in LatticeTester::Rank1Lattice< Int, Real >.
|
protectedvirtual |