LatNet Builder Manual
2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
|
LatBuilder namespace. More...
Namespaces | |
Functor | |
Various functors. | |
GenSeq | |
Sequences of generator values. | |
IndexedIterator | |
Immutable indexed iterators. | |
Interlaced | |
Features used for interlaced digital nets. | |
Kernel | |
Kernels for coordinate-uniform figures of merit. | |
LatSeq | |
Sequences of Lattices. | |
MeritCombiner | |
Combiner functors for merit values. | |
MeritSeq | |
Sequences of merit values. | |
Norm | |
Normalizations and bounds. | |
Parser | |
String parsing facilities for LatBuilder objects. | |
ProjDepMerit | |
Projection-dependent figures of merit. | |
Task | |
Standard tasks that can be performed by LatBuilder. | |
TextStream | |
Overloaded stream operators. | |
Traversal | |
Traversal types for indexable sequences. | |
Vectorize | |
Helpers to vectorize simple operations. | |
Typedefs | |
typedef unsigned long | uInteger |
Scalar unsigned integer . | |
typedef double | Real |
Scalar floating-point type. | |
typedef boost::numeric::ublas::vector< Real > | RealVector |
Vector of floating-point values. | |
typedef RealVector::size_type | Level |
Scalar integer type for level of embedding. | |
typedef size_t | Dimension |
Scalar integer type for dimension. | |
typedef NTL::GF2X | Polynomial |
polynomial over Z/2Z type | |
Enumerations | |
enum | LatticeType { ORDINARY, POLYNOMIAL, DIGITAL } |
Lattices supported: ordinary lattice rules amd polynomial lattice rules. | |
enum | EmbeddingType { UNILEVEL, MULTILEVEL } |
Simple lattice / a sequence of embedded lattices. | |
enum | Compress { NONE, SYMMETRIC } |
Types of compression. | |
enum | PerLevelOrder { BASIC, CYCLIC } |
Functions | |
template<LatticeType LR, Compress COMPRESS, PerLevelOrder PLO, class E > | |
Storage< LR, EmbeddingType::UNILEVEL, COMPRESS, PLO >::MeritValue | compressedSum (const Storage< LR, EmbeddingType::UNILEVEL, COMPRESS, PLO > &storage, const boost::numeric::ublas::vector_expression< E > &e) |
Sum of all the elements of a (possibly compressed) vector. More... | |
template<LatticeType LR, Compress COMPRESS, PerLevelOrder PLO, class E > | |
Storage< LR, EmbeddingType::MULTILEVEL, COMPRESS, PLO >::MeritValue | compressedSum (const Storage< LR, EmbeddingType::MULTILEVEL, COMPRESS, PLO > &storage, const boost::numeric::ublas::vector_expression< E > &e) |
Returns the per-level sums of the elements of the compressed multilevel vector expression e . | |
template<typename INT > | |
std::ostream & | operator<< (std::ostream &os, Digits< INT > &digits) |
std::ostream & | operator<< (std::ostream &os, const FigureOfMerit &merit) |
Formats merit and outputs it on os . | |
template<typename VEC , typename MAP > | |
boost::numeric::ublas::vector_indirect< VEC, IndexMap< MAP > > | permuteVector (VEC &vec, MAP mapper) |
Returns a vector proxy whose elements are a permutation of another vector. More... | |
int | main (int argc, const char *argv[]) |
template<EmbeddingType ET> | |
std::ostream & | operator<< (std::ostream &os, const LatDef< LatticeType::ORDINARY, ET > &lat) |
Formats lat and outputs it to os . | |
template<EmbeddingType ET> | |
std::ostream & | operator<< (std::ostream &os, const LatDef< LatticeType::POLYNOMIAL, ET > &lat) |
template<LatticeType LR, EmbeddingType ET> | |
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. | |
template<LatticeType LR> | |
std::ostream & | operator<< (std::ostream &, const BasicMeritFilterList< LR, EmbeddingType::UNILEVEL > &) |
Formats and outputs filters to os . | |
template<LatticeType LR> | |
std::ostream & | operator<< (std::ostream &, const BasicMeritFilterList< LR, EmbeddingType::MULTILEVEL > &) |
template<LatticeType LR> | |
std::ostream & | operator<< (std::ostream &os, const MeritFilterList< LR, EmbeddingType::UNILEVEL > &filters) |
Formats and outputs filters to os . | |
template<LatticeType LR> | |
std::ostream & | operator<< (std::ostream &os, const MeritFilterList< LR, EmbeddingType::MULTILEVEL > &filters) |
template<class D > | |
std::ostream & | operator<< (std::ostream &os, const BasicSizeParam< D > &sizeParam) |
DECLARE_TYPEINFO (float) | |
DECLARE_TYPEINFO (double) | |
DECLARE_TYPEINFO (int) | |
DECLARE_TYPEINFO (unsigned int) | |
DECLARE_TYPEINFO (long) | |
DECLARE_TYPEINFO (unsigned long long) | |
std::ostream & | operator<< (std::ostream &os, EmbeddingType latType) |
template<typename T > | |
T | intPow (T base, unsigned long exponent) |
Integer exponentiation. More... | |
Polynomial | PolynomialFromInt (uInteger x) |
convert Integer to polynomial More... | |
uInteger | IndexOfPolynomial (Polynomial P) |
convert polynomial to integer More... | |
template<typename T > | |
T | modularPow (T base, uInteger exponent, T modulus) |
Modular exponentiation. More... | |
std::vector< uInteger > | primeFactors (uInteger n, bool raise=false) |
Prime factorization using the naive "trial division" algorithm. More... | |
std::map< uInteger, uInteger > | primeFactorsMap (uInteger n) |
Prime factorization using the naive "trial division" algorithm. More... | |
std::pair< long long, long long > | egcd (uInteger a, uInteger b) |
Extended Euclidian algorithm. More... | |
uInteger | Vm (const Polynomial &h, const Polynomial &P) |
computes The integer \(2^{\deg(P)}\nu_m(\frac{h} {p}) \) where \(\nu_{m}\) is the mapping \(\nu_{m} : \mathbb{L}_{2} \rightarrow \mathbb{R} \) \[ \nu_{m}(\sum_{l=\omega}^{\infty} x_{l} z^{-l}) = \sum_{l=\max(\omega,1)}^{m} x_{l} 2^{-l} \] More... | |
uInteger | log2Int (unsigned int n) |
std::string | getDefaultPolynomial (unsigned int degree) |
Returns a default polynomial of degree degree . More... | |
std::string | to_string (LatticeType LT) |
Variables | |
const int | LENGTH_UINTEGER = 64 |
LatBuilder namespace.
Class and type definitions that are specific to LatBuilder.
Storage<LR, EmbeddingType::UNILEVEL, COMPRESS, PLO>::MeritValue LatBuilder::compressedSum | ( | const Storage< LR, EmbeddingType::UNILEVEL, COMPRESS, PLO > & | storage, |
const boost::numeric::ublas::vector_expression< E > & | e | ||
) |
Sum of all the elements of a (possibly compressed) vector.
In an compressed vector some elements are implicitly repeated.
Referenced by LatBuilder::ProjDepMerit::Evaluator< CoordUniform< KERNEL >, LR, ET, COMPRESS, PLO >::operator()().
Extended Euclidian algorithm.
Source: http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Iterative_method_2
Referenced by LatBuilder::GenSeq::CoprimeIntegers< COMPRESS, TRAV >::CoprimeIntegers(), and LatBuilder::GenSeq::GeneratingValues< LatticeType::ORDINARY, COMPRESS, TRAV >::GeneratingValues().
std::string LatBuilder::getDefaultPolynomial | ( | unsigned int | degree | ) |
Returns a default polynomial of degree degree
.
Polynomials will be primitive and irreducible for degree superior to \(2\), irreducible for degree \(1\) and equal to \(1\) for degree \(0\). The current default list goes up to degree 32. Modify data/default_poly.csv
to change the default polynomials.
degree | Degree of the default polynomial. |
uInteger LatBuilder::IndexOfPolynomial | ( | Polynomial | P | ) |
convert polynomial to integer
the polyomial \( \sum a_iz^i\) is converted to \(\sum a_i2^i\)
T LatBuilder::intPow | ( | T | base, |
unsigned long | exponent | ||
) |
Integer exponentiation.
Source: http://en.wikipedia.org/wiki/Exponentiation_by_squaring#Computation_by_powers_of_2
Referenced by LatBuilder::GenSeq::CoprimeIntegers< COMPRESS, TRAV >::CoprimeIntegers(), LatBuilder::GenSeq::CyclicGroup< LatticeType::POLYNOMIAL, COMPRESS, TRAV, ORDER >::CyclicGroup(), LatBuilder::GenSeq::CyclicGroup< LatticeType::ORDINARY, COMPRESS, TRAV, ORDER >::CyclicGroup(), LatBuilder::GenSeq::PowerSeq< BASE >::element(), LatBuilder::GenSeq::CyclicGroup< LatticeType::POLYNOMIAL, COMPRESS, TRAV, ORDER >::fullSize(), LatBuilder::GenSeq::GeneratingValues< LatticeType::ORDINARY, COMPRESS, TRAV >::GeneratingValues(), LatBuilder::GenSeq::GeneratingValues< LatticeType::POLYNOMIAL, COMPRESS, TRAV >::GeneratingValues(), LatBuilder::Functor::IB::operator()(), LatBuilder::Functor::IAAlpha::operator()(), and LatBuilder::GenSeq::CyclicGroup< LatticeType::POLYNOMIAL, COMPRESS, TRAV, ORDER >::smallestGenerator().
T LatBuilder::modularPow | ( | T | base, |
uInteger | exponent, | ||
T | modulus | ||
) |
Modular exponentiation.
Source: http://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method Note : to use this fonction an operator %
BASE operator% (BASE, MODULUS) has to be implemented
Referenced by LatBuilder::GenSeq::PowerSeq< BASE >::element(), LatBuilder::GenSeq::CyclicGroup< LatticeType::POLYNOMIAL, COMPRESS, TRAV, ORDER >::operator[](), LatBuilder::GenSeq::CyclicGroup< LatticeType::ORDINARY, COMPRESS, TRAV, ORDER >::operator[](), LatBuilder::GenSeq::CyclicGroup< LatticeType::POLYNOMIAL, COMPRESS, TRAV, ORDER >::smallestGenerator(), and LatBuilder::GenSeq::CyclicGroup< LatticeType::ORDINARY, COMPRESS, TRAV, ORDER >::smallestGenerator().
boost::numeric::ublas::vector_indirect<VEC,IndexMap<MAP> > LatBuilder::permuteVector | ( | VEC & | vec, |
MAP | mapper | ||
) |
Returns a vector proxy whose elements are a permutation of another vector.
vec | Original vector. |
mapper | Object that defines a permutation of vector indices through the definition of its member operator() . |
To use this function, first define a mapper class, say MyMapper
, that defines the type size_type
, that implements size()
whose return value is number of elements in the permutation, and that implements operator()
that maps an input index (the operator argument) to an output index, e.g.:
Next, simply instantiate a Boost uBLAS vector vec
and obtain a permutation pvec:
Polynomial LatBuilder::PolynomialFromInt | ( | uInteger | x | ) |
convert Integer to polynomial
the integer \(\sum a_i2^i\) is converted to \( \sum a_iz^i\) Note that the input integer must be < 2^64
Referenced by LatBuilder::GenSeq::GeneratingValues< LatticeType::POLYNOMIAL, COMPRESS, TRAV >::operator[](), and LatBuilder::GenSeq::CyclicGroup< LatticeType::POLYNOMIAL, COMPRESS, TRAV, ORDER >::smallestGenerator().
Prime factorization using the naive "trial division" algorithm.
Returns a list of prime factors, without their multiplicity if raise
is false
, or raised to their multiplicity if it is true
.
Referenced by LatBuilder::GenSeq::CyclicGroup< LatticeType::POLYNOMIAL, COMPRESS, TRAV, ORDER >::smallestGenerator(), and LatBuilder::GenSeq::CyclicGroup< LatticeType::ORDINARY, COMPRESS, TRAV, ORDER >::smallestGenerator().
Prime factorization using the naive "trial division" algorithm.
Returns a map of (factor, multiplicity) pairs.
Referenced by LatBuilder::GenSeq::CoprimeIntegers< COMPRESS, TRAV >::CoprimeIntegers(), and LatBuilder::GenSeq::GeneratingValues< LatticeType::ORDINARY, COMPRESS, TRAV >::GeneratingValues().
uInteger LatBuilder::Vm | ( | const Polynomial & | h, |
const Polynomial & | P | ||
) |
computes The integer \(2^{\deg(P)}\nu_m(\frac{h} {p}) \)
where \(\nu_{m}\) is the mapping \(\nu_{m} : \mathbb{L}_{2} \rightarrow \mathbb{R} \)
\[ \nu_{m}(\sum_{l=\omega}^{\infty} x_{l} z^{-l}) = \sum_{l=\max(\omega,1)}^{m} x_{l} 2^{-l} \]
reference : https://people.cs.kuleuven.be/~dirk.nuyens/phdthesis/thesis.pdf page 153