Lattice Builder Manual Software Package for Constructing Rank-1 Lattices

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Namespaces | Classes | Typedefs | Enumerations | Functions
LatBuilder Namespace Reference

Lattice Builder namespace. More...

## Namespaces
| Functor
| Various functors.
| GenSeq
| Sequences of generator values.
| IndexedIterator
| Immutable indexed iterators.
| 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 Lattice Builder objects.
| ProjDepMerit
| Projection-dependent figures of merit.
| Task
| Standard tasks that can be performed by Lattice Builder.
| 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...
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...
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...
singleton | MeritFilterListPolicy
| Policy class template for MeritFilterList. More...
class | MeritFilterListPolicy< LatType::EMBEDDED >
| Specialization of MeritFilterListPolicy for embedded lattices. More...
class | MeritFilterListPolicy< LatType::ORDINARY >
| Specialization of MeritFilterListPolicy for ordinary lattices. More...
struct | MeritFilterTraits
| Traits class template for filters of merit values. More...
struct | MeritFilterTraits< LatType::EMBEDDED >
struct | MeritFilterTraits< LatType::ORDINARY >
class | SeqCombiner
| Multidimensional sequence composed of unidimensional sequences. More...
singleton | SizeParam
| Lattice size parameter. More...
class | SizeParam< LatType::EMBEDDED >
| Lattice size type for embedded lattices. More...
class | SizeParam< LatType::ORDINARY >
| Ordinary lattice size parameter. More...
singleton | Storage
| Storage policy. More...
class | Storage< LatType::EMBEDDED, COMPRESS >
| Vector permutation for embedded lattices. More...
class | Storage< LatType::ORDINARY, COMPRESS >
| Storage class for flat vectors. More...
struct | StorageTraits
| Storage traits. More...
struct | StorageTraits< Storage< LatType::EMBEDDED, COMPRESS > >
struct | StorageTraits< Storage< LatType::ORDINARY, 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 | 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 | Modulus
| Scalar integer type for modulus (number of points) values.
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 std::vector< Modulus > | GeneratingVector
| Generating vector type.
typedef GeneratingVector::size_type | Dimension
| Dimension type.

## Enumerations
enum | LatType { ORDINARY, EMBEDDED }
| Types of lattices.
enum | Compress { NONE, SYMMETRIC }
| Types of compression.

## Functions
template<Compress COMPRESS, class E >
Storage< LatType::ORDINARY, COMPRESS >::MeritValue | compressedSum (const Storage< LatType::ORDINARY, COMPRESS > &storage, const boost::numeric::ublas::vector_expression< E > &e)
| Sum of all the elements of a (possibly compressed) vector. More...
template<Compress COMPRESS, class E >
Storage< LatType::EMBEDDED, COMPRESS >::MeritValue | compressedSum (const Storage< LatType::EMBEDDED, COMPRESS > &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...
template<LatType LAT>
std::ostream & | operator<< (std::ostream &os, const LatDef< LAT > &lat)
| Formats `lat` and outputs it to `os`.
template<LatType LAT>
LatDef< LAT > | createLatDef (SizeParam< LAT > sizeParam=SizeParam< LAT >(), GeneratingVector gen=GeneratingVector())
| Returns a lattice definition instance with the proper type of size parameter.
std::ostream & | operator<< (std::ostream &, const BasicMeritFilterList< LatType::ORDINARY > &)
| Formats and outputs `filters` to `os`.
std::ostream & | operator<< (std::ostream &, const BasicMeritFilterList< LatType::EMBEDDED > &)
std::ostream & | operator<< (std::ostream &os, const MeritFilterList< LatType::ORDINARY > &filters)
| Formats and outputs `filters` to `os`.
std::ostream & | operator<< (std::ostream &os, const MeritFilterList< LatType::EMBEDDED > &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, LatType latType)
template<typename T >
T | intPow (T base, unsigned long exponent)
| Integer exponentiation. More...
Modulus | modularPow (Modulus base, Modulus exponent, Modulus modulus)
| Modular exponentiation. More...
std::vector< Modulus > | primeFactors (Modulus n, bool raise=false)
| Prime factorization using the naive "trial division" algorithm. More...
std::map< Modulus, Modulus > | primeFactorsMap (Modulus n)
| Prime factorization using the naive "trial division" algorithm. More...
std::pair< long long, long long > | egcd (Modulus a, Modulus b)
| Extended Euclidian algorithm. More...

## Detailed Description

Lattice Builder namespace.

Class and type definitions that are specific to Lattice Builder.

## Function Documentation

template<Compress COMPRESS, class E >

Storage<LatType::ORDINARY, COMPRESS>::MeritValue LatBuilder::compressedSum | ( | const Storage< LatType::ORDINARY, COMPRESS > & | 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 >, LAT, COMPRESS >::operator()().

std::pair<long long, long long> LatBuilder::egcd | ( | Modulus | a,
|  | Modulus | b
| ) |  |

Extended Euclidian algorithm.

Source: http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Iterative_method_2

Referenced by LatBuilder::GenSeq::CoprimeIntegers< COMPRESS, TRAV >::CoprimeIntegers().

template<typename T >

T LatBuilder::intPow | ( | T | base,
|  | unsigned long | exponent
| ) |  |

Integer exponentiation.

Source: http://en.wikipedia.org/wiki/Exponentiation_by_squaring#Computation_by_powers_of_2

Examples:
  tutorial/GenSeqExtend.cc.

Referenced by LatBuilder::GenSeq::CoprimeIntegers< COMPRESS, TRAV >::CoprimeIntegers(), LatBuilder::GenSeq::CyclicGroup< COMPRESS, TRAV, ORDER >::CyclicGroup(), and LatBuilder::GenSeq::PowerSeq< BASE >::element().

Modulus LatBuilder::modularPow | ( | Modulus | base,
|  | Modulus | exponent,
|  | Modulus | modulus
| ) |  |

Modular exponentiation.

Source: http://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method

Referenced by LatBuilder::GenSeq::CyclicGroup< COMPRESS, TRAV, ORDER >::CyclicGroup(), LatBuilder::GenSeq::PowerSeq< BASE >::element(), LatBuilder::GenSeq::CyclicGroup< COMPRESS, TRAV, ORDER >::operator[](), and LatBuilder::GenSeq::CyclicGroup< COMPRESS, TRAV, ORDER >::smallestGenerator().

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

  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.:

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

Examples:
  IndexMap.cc.

std::vector<Modulus> LatBuilder::primeFactors | ( | Modulus | 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< COMPRESS, TRAV, ORDER >::smallestGenerator().

std::map<Modulus, Modulus> LatBuilder::primeFactorsMap | ( | Modulus | n | ) |

Prime factorization using the naive "trial division" algorithm.

Returns a map of (factor, multiplicity) pairs.

Referenced by LatBuilder::GenSeq::CoprimeIntegers< COMPRESS, TRAV >::CoprimeIntegers().