This example shows how to instantiate lattice definitions.
This example shows how to instantiate lattice definitions.
#include "latbuilder/LatDef.h"
#include "latbuilder/SizeParam.h"
#include "latbuilder/TextStream.h"
#include <iostream>
using TextStream::operator<<;
template <LatticeType LA, EmbeddingType L>
{
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;
}
int main()
{
SET_PATH_TO_LATNETBUILDER_FOR_EXAMPLES();
std::cout << "ordinary - simple lattice:" << std::endl;
printLatDef(ordinary);
std::cout << "ordinary - embedded lattice:" << std::endl;
printLatDef(embedded);
);
std::cout << "polynomial - simple lattice:" << std::endl;
printLatDef(pordinary);
);
std::cout << "polynomial - embedded lattice:" << std::endl;
printLatDef(pembedded);
return 0;
}
This file contains a global variable PATH_TO_LATNETBUILDER_DIR which should always equal the path to ...
Definition of a rank-1 lattice.
Definition LatDef.h:40
SizeParam< LR, ET > & sizeParam()
Returns the size parameter of the lattice.
Definition LatDef.h:65
Dimension dimension() const
Returns the dimension of the lattice.
Definition LatDef.h:85
GeneratingVector & gen()
Returns the generating vector of the lattice.
Definition LatDef.h:75
Lattice size parameter.
Definition SizeParam.h:30
LatBuilder namespace.
Definition libtut_lat.dox:17
Polynomial PolynomialFromInt(uInteger x)
convert Integer to polynomial
LatDef< LR, ET > createLatDef(SizeParam< LR, ET > sizeParam=SizeParam< LR, ET >(), typename LatDef< LR, ET >::GeneratingVector gen=typename LatDef< LR, ET >::GeneratingVector())
Returns a lattice definition instance with the proper type of size parameter.
Definition LatDef.h:144
NTL::polynomial Polynomial
polynomial over Z/2Z type. This is just a wrapper over NTL::GF2X. See ntlwrap.h.
Definition Types.h:56