Charades
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
clcg4 Class Reference

Implementation of a CLCG4 random number generator, based on the reversible implementation from ROSS (https://github.com/ROSS-org/ROSS) More...

#include <clcg4.h>

Classes

struct  tw_rng
 

Public Types

using result_type = double
 

Public Member Functions

 clcg4 (int32_t s[4])
 
 clcg4 (uint64_t id)
 
void seed ()
 
void seed (int32_t s[4])
 
void seed (uint64_t id)
 
constexpr result_type operator() () noexcept
 
void prev () noexcept
 
constexpr uint64_t count () noexcept
 
void pup (PUP::er &p)
 
constexpr void discard (uint64_t n) noexcept
 
constexpr bool operator== (const clcg4 &rhs) noexcept
 
constexpr bool operator!= (const clcg4 &rhs) noexcept
 

Static Public Member Functions

static void init (int v, int w)
 
static void init (int v, int w, int32_t init_seed[4])
 
static constexpr result_type min () noexcept
 
static constexpr result_type max () noexcept
 

Private Types

enum  SeedType { InitialSeed, LastSeed, NewSeed }
 

Private Member Functions

void init_generator (SeedType Where)
 

Static Private Member Functions

static int64_t find_b (int64_t a, int64_t k, int64_t m)
 
static int32_t mult_mod_M (int32_t s, int32_t t, int32_t M)
 

Private Attributes

int32_t Ig [4]
 
int32_t Lg [4]
 
int32_t Cg [4]
 
uint64_t _count = 0
 

Static Private Attributes

static tw_rng rng
 
static constexpr int32_t H = 32768
 

Friends

std::ostream & operator<< (std::ostream &os, const clcg4 &rhs)
 
auto operator>> (std::istream &is, clcg4 &rhs) -> std::istream &
 

Detailed Description

Implementation of a CLCG4 random number generator, based on the reversible implementation from ROSS (https://github.com/ROSS-org/ROSS)


The documentation for this class was generated from the following files: