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
Random.cc File Reference
#include "latticetester/Random.h"
#include <climits>

Namespaces

namespace  LatticeTester
 Lattice namespace.
 
namespace  LatticeTester::Random
 This class generates random numbers (in fact pseudo-random numbers).
 

Macros

#define GERME   (ULONG_MAX / 54321)
 
#define NORM53   1.11022302462515654e-16 /* 1/2^53 */
 
#define NORM32   2.3283064365386963e-10 /* 1/2^32 */
 
#define MASK53   0x1fffffffffffffUL /* 2^53 - 1 */
 

Functions

std::int64_t LatticeTester::Random::randInt (std::int64_t i, std::int64_t j)
 Return a random integer in \([i, j]\).
 
NTL::ZZ LatticeTester::Random::randInt (NTL::ZZ i, NTL::ZZ j)
 This is an overload of the previous method to create an NTL::ZZ integer in the range \([i,j]\).
 
double LatticeTester::Random::randU01 ()
 Returns a random number in \([0, 1)\).
 
std::uint64_t LatticeTester::Random::randBits (int64_t s)
 Returns random blocks of \(s\) bits ( \(s\)-bit integers).
 
void LatticeTester::Random::setSeed (uint64_t seed)
 

Macro Definition Documentation

◆ GERME

#define GERME   (ULONG_MAX / 54321)

◆ MASK53

#define MASK53   0x1fffffffffffffUL /* 2^53 - 1 */

◆ NORM32

#define NORM32   2.3283064365386963e-10 /* 1/2^32 */

◆ NORM53

#define NORM53   1.11022302462515654e-16 /* 1/2^53 */