This example shows how to append digits to the left of a component of a generating vector in order to extend the number of points of a lattice.
This example shows how to append digits to the left of a component of a generating vector in order to extend the number of points of a lattice.
#include "latbuilder/GenSeq/Extend.h"
#include "latbuilder/TextStream.h"
#include "latbuilder/Digits.h"
#include <iostream>
using TextStream::operator<<;
template <typename SEQ>
void showSeq(
uInteger base,
const SEQ& seq)
{
for (auto x : seq) {
std::cout << " " << digits << std::endl;
}
}
int main()
{
SET_PATH_TO_LATNETBUILDER_FOR_EXAMPLES();
std::cout << "base: " << b << std::endl;
std::cout << " one level: " << seq << std::endl;
showSeq(b, seq);
}
return 0;
}
This file contains a global variable PATH_TO_LATNETBUILDER_DIR which should always equal the path to ...
Vector of digits representing a number in an arbitrary base.
Definition Digits.h:30
Indexed sequence of integers that extend on an smaller integer by adding higher-order digits.
Definition Extend.h:37
Tools for streaming and poor man's factorization.
LatBuilder namespace.
Definition libtut_lat.dox:17
Polynomial PolynomialFromInt(uInteger x)
convert Integer to polynomial
T intPow(T base, unsigned long exponent)
Integer exponentiation.
Definition Util.h:45
NTL::polynomial Polynomial
polynomial over Z/2Z type. This is just a wrapper over NTL::GF2X. See ntlwrap.h.
Definition Types.h:56
unsigned long uInteger
Scalar unsigned integer .
Definition Types.h:40