LatNet Builder Manual 2.1.3-6
Software Package for Constructing Highly Uniform Point Sets
Loading...
Searching...
No Matches
Lattice Types and Definitions

LatBuilder supports two types of lattices: ordinary lattices and polynomial lattices. One has also the choice between simple (unilevel) lattices and embedded (multilevel) lattices. The first choice corresponds to the LatticeType enumeration and the second to the EmbeddingType enumeration. These two enumerations are used across all the library as non-type template parameters to implement different policies accordingly with the type of lattices.

The representations of ordinary and polynomial lattices differ by the type of their size parameter. In LatBuilder, the size parameter refers to the modulus of the lattice: it is an integer for ordinary lattice rules and a polynomial for polynomial lattice rules.

Note that, in the case of polynomial lattice rules, this differs from the command line interface, where there are both a –size-parameter and a –modulus option. This distinction does not exist internally inside LatBuilder. The command line –size-parameter is replaced by the modulus (either user-specified or default polynomial) during parsing.

The SizeParam class encodes size parameters (i.e. modulus) for lattice rules. Hence a lattice of either type can be defined by its size parameter, together with its dimension \(s\) and the components of its generating vector \(\boldsymbol a = (a_1, \dots, a_s)\). The LatDef class can be used for this purpose, as in tutorial/LatDef.cc.

The following function calls some members of LatDef:

template <LatticeType LA, EmbeddingType L>
void printLatDef(const LatDef<LA, L>& def)
{
std::cout << "dimension: " << def.dimension() << std::endl;
std::cout << "size parameter: " << def.sizeParam() << std::endl;
std::cout << "generating vector: " << def.gen() << std::endl;
std::cout << "definition: " << std::endl << def << std::endl;
}

The following examples show how to use LatDef to construct the different lattice types and print some basic information about the constructed lattices:

  • simple ordinary lattice: A simple ordinary lattice can be instantiated by passing to the LatDef constructor a size parameter, here \(n=31\), and a generating vector, here \(\boldsymbol a = (1,12,3)\):

    std::cout << "ordinary - simple lattice:" << std::endl;
    printLatDef(ordinary);

    This outputs:

    ordinary - simple lattice:
    dimension:         3
    size parameter:    31
    generating vector: [1, 12, 3]
    definition:        
    Ordinary Lattice - Modulus = 31 - Generating vector = [1, 12, 3]
    
  • embedded ordinary lattice:

    Embedded ordinary lattices with \(n=b^\ell\) for \(\ell=0,\dots,m\) can be instantiated by passing the LatDef constructor a size parameter \((b,m)\), here \((b,m)=(2,5)\), and a generating vector, here \(\boldsymbol a = (1,7,9)\):

    std::cout << "ordinary - embedded lattice:" << std::endl;
    printLatDef(embedded);

    This outputs:

    ordinary - embedded lattice:
    dimension:         3
    size parameter:    2^5
    generating vector: [1, 7, 9]
    definition:        
    Ordinary Lattice - Modulus = 2^5 - Generating vector = [1, 7, 9]
    
  • simple polynomial lattice:

    Simple polynomial lattices can be instantiated by passing the LatDef constructor a size parameter, here \(P = 1 + z^2 + z^3\), and a generating vector, here \(\boldsymbol q = (1,1+z^2,1+z)\):

    Polynomial P = PolynomialFromInt(13); // P = 1 + z^2 + z^3
    auto pordinary = createLatDef(
    );
    std::cout << "polynomial - simple lattice:" << std::endl;
    printLatDef(pordinary);

    This outputs:

    polynomial - simple lattice:
    dimension:         3
    size parameter:    13
    generating vector: [1, 5, 3]
    definition:        
    Polynomial Lattice - Modulus = 13 - Generating vector = 
      1
      5
      3
    
  • embedded polynomial lattice:

    Embedded polynomial lattices with \(P=b^\ell\) for \(\ell=0,\dots,m\) can be instantiated by passing the LatDef constructor a size parameter \((b,m)\), here \((b,m)=(z,5)\), and a generating vector, here \(\boldsymbol q = (1,z+z^3,1+z)\):

    auto pembedded = createLatDef(
    );
    std::cout << "polynomial - embedded lattice:" << std::endl;
    printLatDef(pembedded);

    This outputs:

    polynomial - embedded lattice:
    dimension:         3
    size parameter:    2^5
    generating vector: [1, 10, 3]
    definition:        
    Polynomial Lattice - Modulus = 2^5 - Generating vector = 
      1
      10
      3
    
See also
EmbeddingType LatDef