Lattice Builder Manual Software Package for Constructing Rank-1 Lattices
Lattice Types and Definitions

Lattice Builder supports two types of lattices: ordinary and embedded.

Their representation in Lattice Builder differs only by the type of their size parameter. The size of an ordinary lattice (of type SizeParam<LatType::ORDINARY>) is specified by a single integer: the number of points in the lattice $$n$$. The size of an embedded lattice (of type SizeParam<LatType::EMBEDDED>) is specified by two integers: a prime base $$b$$ and a maximum level $$m$$, such that, for the embedded lattice at the maximum level, $$n = b^m$$.

A lattice of either type can be defined by its size parameter(s) together with its dimension $$s$$ and the components of its generating vector $$\boldsymbol a = (a_1, \dots, a_s)$$. The class LatDef can be used for that purpose, as in tutorial/LatDef.cc. The following function calls some members of LatDef:

template <LatType L>
void printLatDef(const LatDef<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: " << def << std::endl;
}

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

auto ordinary = createLatDef(SizeParam<LatType::ORDINARY>(31), {1, 12, 3});
std::cout << "ordinary lattice:" << std::endl;
printLatDef(ordinary);

This outputs:

ordinary lattice:
dimension:         3
size parameter:    31
generating vector: [1, 12, 3]
definition:        lattice(31, [1, 12, 3])


Embedded 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)$$:

auto embedded = createLatDef(SizeParam<LatType::EMBEDDED>(2, 5), {1, 7, 9});
std::cout << "embedded lattice:" << std::endl;
printLatDef(embedded);

This outputs:

embedded lattice:
dimension:         3
size parameter:    2^5
generating vector: [1, 7, 9]
definition:        lattice(2^5, [1, 7, 9])


Note that the size parameter for the embedded lattice:

SizeParam<LatType::EMBEDDED>(2, 5)

could also have been instantiated directly with the number of points ( $$2^5=32$$):

SizeParam<LatType::EMBEDDED>(32)