Lattice Tester Online Documentation 0.1.0-861
Software Package For Testing The Uniformity Of Integral Lattices In The Real Space
Loading...
Searching...
No Matches
FlexTypes.h File Reference
#include <cstdint>
#include <NTL/vector.h>
#include <NTL/matrix.h>
#include <NTL/ZZ.h>
#include <NTL/RR.h>
#include <NTL/xdouble.h>
#include <NTL/quad_float.h>
#include "latticetester/NTLWrap.h"

Macros

#define LD   1
 
#define ZD   2
 
#define ZX   4
 
#define ZQ   6
 
#define ZR   8
 

Functions

template<typename Int , typename Real >
void strTypes (std::string &str)
 There are five admissible combinations of types for (Int, Real).
 

Macro Definition Documentation

◆ LD

#define LD   1

◆ ZD

#define ZD   2

◆ ZQ

#define ZQ   6

◆ ZR

#define ZR   8

◆ ZX

#define ZX   4

Function Documentation

◆ strTypes()

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

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 o put: #define TYPES_CODE ZD at the very beginning of the file, before the present file is read.

Another (more flexible) way of specifying the flexible types (Int, Real) is to pass the types we want to use in the class and function templates. See the guide and the examples to see how to do that. 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.