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

This file offers functions to generate random numbers use when making random searches. More...

Namespaces

namespace  LatticeTester
 LatticeTester namespace.
 
namespace  LatticeTester::Random
 

Macros

#define GERME   (ULONG_MAX / 54321)
 

Functions

double LatticeTester::Random::randU01 ()
 Returns a random number in \([0, 1)\).
 
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]\).
 
std::uint64_t LatticeTester::Random::randBits (int64_t s)
 Returns random blocks of \(s\) bits ( \(s\)-bit integers).
 
void LatticeTester::Random::setSeed (std::uint64_t seed=GERME)
 Sets the seed of the generator.
 

Detailed Description

This file offers functions to generate random numbers use when making random searches.

The base generator is the 64-bit LFSR258 from [8], with period near \(2^{258}\), for 64-bit computers, and the 32-bit generator LFSR113 from [8], with period length near \(2^{113}\) on 32-bits computers. Thus the random numbers are different on 32-bits and 64-bits machines.

Macro Definition Documentation

◆ GERME

#define GERME   (ULONG_MAX / 54321)