LatNet Builder Manual  2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
LatBuilder Namespace Reference

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.
 

Classes

class  Accumulator
 Accumulator template class. More...
 
struct  BasicMeritFilter
 Abstract base class for filters. More...
 
class  BasicMeritFilterList
 Container class for merit filters. More...
 
class  BasicSizeParam
 Abstract CRTP base class for lattice size parameter. More...
 
class  BasicStorage
 Base class for storage types. More...
 
class  BridgeIteratorCached
 Bridge iterator with cached value. More...
 
class  BridgeIteratorCachedPtr
 Bridge iterator with cached value accessible through a pointer. More...
 
class  BridgeIteratorDynamic
 Bridge iterator with dynamically computed value. More...
 
class  BridgeSeq
 Bridge CRTP class for sequence based on another type of sequence, with elements computed by the derived class. More...
 
class  CachedSeq
 Cached sequence wrapper. More...
 
class  CartesianProduct
 Iterator incrementing policy that traverses unidimensional sequences sequentially. More...
 
class  ClonePtr
 Copyable alternative to std::unique_ptr<> for cloneable objects. More...
 
class  CombinedWeights
 Combined weights. More...
 
struct  CompressTraits
 Compression types for vectors and matrices. More...
 
struct  CompressTraits< Compress::NONE >
 No compression. More...
 
struct  CompressTraits< Compress::SYMMETRIC >
 Symmetric compression. More...
 
class  CoordUniformFigureOfMerit
 Base base class for coordinate-uniform figures of merit. More...
 
struct  defaultPerLevelOrder
 default per level value depending on the lattice (ordinary/polynomial) and the lattice type (ordinary/embedded). More...
 
struct  defaultPerLevelOrder< LatticeType::DIGITAL, EmbeddingType::MULTILEVEL >
 
struct  defaultPerLevelOrder< LatticeType::DIGITAL, EmbeddingType::UNILEVEL >
 
struct  defaultPerLevelOrder< LatticeType::ORDINARY, EmbeddingType::MULTILEVEL >
 
struct  defaultPerLevelOrder< LatticeType::ORDINARY, EmbeddingType::UNILEVEL >
 
struct  defaultPerLevelOrder< LatticeType::POLYNOMIAL, EmbeddingType::MULTILEVEL >
 
struct  defaultPerLevelOrder< LatticeType::POLYNOMIAL, EmbeddingType::UNILEVEL >
 
class  Digits
 Vector of digits representing a number in an arbitrary base. More...
 
class  FigureOfMerit
 Abstract base class for figures of merit. More...
 
class  IndexMap
 Permutation of vector indices. More...
 
class  LatDef
 Definition of a rank-1 lattice. More...
 
struct  LatticeRejectedException
 Exception raised by filters upon rejection of a candidate lattice rule. More...
 
struct  LatticeTraits
 Lattice traits. More...
 
struct  LatticeTraits< LatticeType::DIGITAL >
 Lattice traits for digital lattice rule. More...
 
struct  LatticeTraits< LatticeType::ORDINARY >
 Lattice traits for ordinary lattice rule. More...
 
struct  LatticeTraits< LatticeType::POLYNOMIAL >
 Lattice traits for polynomial lattice rule. More...
 
class  LFSR113
 LFSR113 pseudo-random generator by L'Ecuyer. More...
 
class  LFSR258
 LFSR258 pseudo-random generator by L'Ecuyer. More...
 
class  MeritFilter
 Generic filter wrapper for merit values. More...
 
class  MeritFilterList
 List of filters for merit values. More...
 
class  MeritFilterListPolicy
 Policy class template for MeritFilterList. More...
 
class  MeritFilterListPolicy< LR, EmbeddingType::MULTILEVEL >
 Specialization of MeritFilterListPolicy for embedded lattices. More...
 
class  MeritFilterListPolicy< LR, EmbeddingType::UNILEVEL >
 Specialization of MeritFilterListPolicy for ordinary lattices. More...
 
struct  MeritFilterTraits
 Traits class template for filters of merit values. More...
 
struct  MeritFilterTraits< EmbeddingType::MULTILEVEL >
 
struct  MeritFilterTraits< EmbeddingType::UNILEVEL >
 
struct  PerLevelOrderTraits
 
struct  PerLevelOrderTraits< PerLevelOrder::BASIC, LatticeType::DIGITAL, COMPRESS >
 
struct  PerLevelOrderTraits< PerLevelOrder::BASIC, LR, COMPRESS >
 
struct  PerLevelOrderTraits< PerLevelOrder::CYCLIC, LR, COMPRESS >
 
class  SeqCombiner
 Multidimensional sequence composed of unidimensional sequences. More...
 
class  SizeParam
 Lattice size parameter. More...
 
class  SizeParam< LR, EmbeddingType::MULTILEVEL >
 Lattice size type for embedded lattices. More...
 
class  SizeParam< LR, EmbeddingType::UNILEVEL >
 Ordinary lattice size parameter. More...
 
struct  SizeParamTraits
 SizeParam traits. More...
 
struct  SizeParamTraits< SizeParam< LatticeType::DIGITAL, ET > >
 SizeParam traits for digital lattice rule. More...
 
struct  SizeParamTraits< SizeParam< LatticeType::ORDINARY, ET > >
 SizeParam traits for ordinary lattice rule. More...
 
struct  SizeParamTraits< SizeParam< LatticeType::POLYNOMIAL, ET > >
 SizeParam traits for polynomial lattice rule. More...
 
class  Storage
 Storage policy. More...
 
class  Storage< LR, EmbeddingType::MULTILEVEL, COMPRESS, PLO >
 Vector permutation for embedded lattices. More...
 
class  Storage< LR, EmbeddingType::UNILEVEL, COMPRESS, PLO >
 Storage class for flat vectors. More...
 
struct  StorageTraits
 Storage traits. More...
 
struct  StorageTraits< Storage< LatticeType::DIGITAL, EmbeddingType::MULTILEVEL, COMPRESS > >
 
struct  StorageTraits< Storage< LatticeType::DIGITAL, EmbeddingType::UNILEVEL, COMPRESS > >
 
struct  StorageTraits< Storage< LR, EmbeddingType::MULTILEVEL, COMPRESS, PLO > >
 
struct  StorageTraits< Storage< LR, EmbeddingType::UNILEVEL, COMPRESS > >
 
struct  TypeInfo
 Framework to specify a human-readable name for data types. More...
 
struct  TypeInfo< boost::accumulators::tag::max >
 
struct  TypeInfo< boost::accumulators::tag::sum >
 
class  UniformUIntDistribution
 
class  WeightedFigureOfMerit
 Weighted figure of merit. More...
 
class  WeightedFigureOfMeritEvaluator
 Evaluator for WeightedFigureOfMerit. More...
 
class  WeightsDispatcher
 
class  Zip
 Iterator incrementing policy that traverses unidimensional sequences in parallel. More...
 

Typedefs

typedef unsigned long uInteger
 Scalar unsigned integer .
 
typedef double Real
 Scalar floating-point type.
 
typedef boost::numeric::ublas::vector< RealRealVector
 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 >
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 >
modularPow (T base, uInteger exponent, T modulus)
 Modular exponentiation. More...
 
std::vector< uIntegerprimeFactors (uInteger n, bool raise=false)
 Prime factorization using the naive "trial division" algorithm. More...
 
std::map< uInteger, uIntegerprimeFactorsMap (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
 

Detailed Description

LatBuilder namespace.

Class and type definitions that are specific to LatBuilder.

Function Documentation

◆ compressedSum()

template<LatticeType LR, Compress COMPRESS, PerLevelOrder PLO, class E >
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()().

◆ egcd()

◆ getDefaultPolynomial()

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.

Parameters
degreeDegree of the default polynomial.

◆ IndexOfPolynomial()

uInteger LatBuilder::IndexOfPolynomial ( Polynomial  P)

convert polynomial to integer

the polyomial \( \sum a_iz^i\) is converted to \(\sum a_i2^i\)

◆ intPow()

◆ modularPow()

◆ permuteVector()

template<typename VEC , typename MAP >
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.

Parameters
vecOriginal vector.
mapperObject 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.:

class MyMapper {
public:
typedef unsigned size_type;
size_type size() const { return ...; }
size_type operator() (size_type i) const { return ...; }
};

Next, simply instantiate a Boost uBLAS vector vec and obtain a permutation pvec:

boost::numeric::ublas::vector<unsigned> vec(10);
auto pvec = LatBuilder::permuteVector(vec, MyMapper());

◆ PolynomialFromInt()

◆ primeFactors()

std::vector<uInteger> LatBuilder::primeFactors ( uInteger  n,
bool  raise = false 
)

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().

◆ primeFactorsMap()

std::map<uInteger, uInteger> LatBuilder::primeFactorsMap ( uInteger  n)

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().

◆ Vm()

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