Lattice Tester Online Documentation unknown
Software Package For Testing The Uniformity Of Integral Lattices In The Real Space
Loading...
Searching...
No Matches
FlexTypes.h File Reference

Tools to select and print the choices of flexible types Int and Real, and the corresponding integer types for arithmetic modulo p. More...

Macros

#define LD   1
#define ZD   2
#define ZX   4
#define ZQ   6
#define ZR   8
#define IntVec   NTL::Vec<Int>
#define IntMat   NTL::Mat<Int>
#define RealVec   NTL::Vec<Real>
#define RealMat   NTL::Mat<Real>

Typedefs

typedef NTL::ZZ Int
typedef NTL::ZZ_p IntP
typedef NTL::ZZ_pE PolE
typedef NTL::ZZ_pX PolX
typedef NTL::vec_ZZ_p IntVecP
typedef NTL::mat_ZZ_p IntMatP

Functions

template<typename Int, typename Real>
void strTypes (std::string &str)
 This template function returns a character string that gives the values of Int and Real, usually for printing purposes.
static NTL::ZZ_p to_Int_p (Int a)
static void mod_init (Int m)

Detailed Description

Tools to select and print the choices of flexible types Int and Real, and the corresponding integer types for arithmetic modulo p.

There are five admissible combinations of types for (Int, Real). They are represented by the five codes given below. For example, to use Int = NTL::ZZ, Real = double in a program, it suffices to put: #define TYPES_CODE ZD at the very beginning of the file, before the present FlexTypes.h file is read. See BasisConstructionSmall.cc for an example.

Another way of specifying the flexible types (Int, Real, ...) is to pass the types we want in the class and function templates. This permits one to use different choices of types in the same program execution. See the guide and the examples to see how to do that.

Macro Definition Documentation

◆ LD

#define LD   1

◆ ZD

#define ZD   2

◆ ZX

#define ZX   4

◆ ZQ

#define ZQ   6

◆ ZR

#define ZR   8

◆ IntVec

#define IntVec   NTL::Vec<Int>

◆ IntMat

#define IntMat   NTL::Mat<Int>

◆ RealVec

#define RealVec   NTL::Vec<Real>

◆ RealMat

#define RealMat   NTL::Mat<Real>

Typedef Documentation

◆ Int

typedef NTL::ZZ Int

◆ IntP

typedef NTL::ZZ_p IntP

◆ PolE

typedef NTL::ZZ_pE PolE

◆ PolX

typedef NTL::ZZ_pX PolX

◆ IntVecP

typedef NTL::vec_ZZ_p IntVecP

◆ IntMatP

typedef NTL::mat_ZZ_p IntMatP

Function Documentation

◆ strTypes()

template<typename Int, typename Real>
void strTypes ( std::string & str)

This template function returns a character string that gives the values of Int and Real, usually for printing purposes.

For example, strTypes<NTL::ZZ,double>(str) will return the string Int = NTL::ZZ, Real = double in str.

◆ to_Int_p()

NTL::ZZ_p to_Int_p ( Int a)
static

◆ mod_init()

void mod_init ( Int m)
static