Lattice Builder Manual Software Package for Constructing Rank-1 Lattices

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LatCommon::KorobovLattice Class Reference

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

`#include <KorobovLattice.h>`

Inherits LatCommon::IntLattice.

## Public Member Functions
| KorobovLattice (const MScal &n, const MScal &a, int maxDim, NormType norm=L2NORM)
| Constructs a Korobov lattice with \(n\) points, maximal dimension `maxDim` using the norm `norm`.
| KorobovLattice (const MScal &n, const MScal &a, int dim, int t, NormType norm=L2NORM)
| Constructor. More...
| KorobovLattice (const KorobovLattice &Lat)
| Copy constructor.
KorobovLattice & | operator= (const KorobovLattice &Lat)
| Assigns `Lat` to this object.
| ~KorobovLattice ()
| 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. More...
Public Member Functions inherited from LatCommon::IntLattice
| IntLattice (const MScal &m, int k, int maxDim, NormType norm=L2NORM)
| Constructor. More...
| IntLattice (const IntLattice &Lat)
| Copy constructor. More...
IntLattice & | operator= (const IntLattice &Lat)
| Assigns `Lat` to this object. More...
virtual | ~IntLattice ()
| Destructor.
void | copy (const IntLattice &lattice)
| Same as assignment operator above.
int | getDim () const
| Returns actual dimension `Dim`.
void | setDim (int d)
| Sets actual dimension to \(d\).
int | getMaxDim () const
| Returns the maximal dimension of the lattice.
NormType | getNorm () const
| Returns the norm used by the lattice.
MScal | getM () const
| Returns the value of the modulus \(m\) of the recurrence (the number of points of the lattice).
NScal | getM2 () const
| Returns the square number of points in the lattice.
int | getOrder () const
| Returns the order.
Normalizer * | getNormalizer (NormaType norma, int alpha)
| Creates and returns the normalizer corresponding to criterion `norma`. More...
Base & | getPrimalBasis ()
| Returns the primal basis `V`.
Base & | getDualBasis ()
| Returns the dual basis `W`.
void | calcLgVolDual2 (bool dualF)
| Computes the logarithm of the normalization factor `m_lgVolDual2` for the merit in all dimensions % \(\le \) `maxDim` for the dual lattice if `dualF` is `true`, and for the primal lattice if `dualF` is `false`.
double | getLgVolDual2 (int i) const
bool | getXX (int i) const
void | setXX (bool val, int i)
void | sort (int d)
| Sorts the basis vectors with indices from \(d+1\) to the dimension of the basis by increasing length. More...
void | permute (int i, int j)
| Exchanges vectors \(i\) and \(j\) in the basis and in the dual basis.
void | write (const char *filename) const
| Writes this basis in file named `filename`.
void | trace (char *msg)
| For debugging purposes.
void | write (int flag)
| Writes this basis on standard output. More...
void | dualize ()
| Exchanges basis \(V\) and its dual \(W\).
bool | checkDuality ()
| Checks that the bases satisfy the duality relation \(V[i]\cdot W[j] = m\,\delta_{ij}\). More...
bool | baseEquivalence (IntLattice &Lat)
| Checks that `Lat's` basis and this basis are equivalent. More...
void | buildProjection (IntLattice *lattice, const Coordinates &proj)
| Builds the basis (and dual basis) of the projection `proj` for this lattice. More...

## Protected Member Functions
void | init ()
| Initialization.
Protected Member Functions inherited from LatCommon::IntLattice
void | init ()
void | kill ()
| Cleans and releases all the memory allocated for this lattice.

## Protected Attributes
MScal | m_a
| The multiplier of the Korobov lattice rule.
int | m_shift
| The shift applied to the lattice rule.
Protected Attributes inherited from LatCommon::IntLattice
int | m_order
| The order of the basis.
MScal | m_m
| Number of points per unit volume (`m_m`) and its square (`m_m2`).
NScal | m_m2
double | m_lgm2
| The logarithm \(\log_2 (m^2)\).
Base | m_v
| Primal basis of the lattice.
Base | m_w
| Dual basis of the lattice.
double * | m_lgVolDual2
bool * | m_xx
| Work variables.
MScal | m_t1
MScal | m_t2
MScal | m_t3
BMat | m_vSI
Base | m_vTemp

## Detailed Description

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, \ldots, a^{d-1}),\quad \mathbf{b_2} = (0, n, 0, \ldots, 0),\quad \ldots,\quad \mathbf{b_d} = (0, \ldots, 0, n). \]

Note
  Pierre: Reprogrammer `incDim` de fa`con` efficace comme dans `MRGLattice`

## Constructor & Destructor Documentation

LatCommon::KorobovLattice::KorobovLattice | ( | const MScal & | n,
|  | const MScal & | a,
|  | int | dim,
|  | int | t,
|  | NormType | norm = `L2NORM`
| ) |  |

Constructor.

Same as above, except the lattice is formed as follow:

\[ \mathbf{b_1} = (a^t, a^{t+1}, a^{t+2}, \ldots, a^{t+d-1}),\qquad \mathbf{b_2} = (0, n, 0, \ldots, 0),\qquad \ldots,\qquad \mathbf{b_d} = (0, \ldots, 0, n). \]

## Member Function Documentation

void LatCommon::KorobovLattice::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.

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

- latcommon/include/latcommon/KorobovLattice.h