Grid 0.7.0
GridSerialRNG Class Reference

#include <Lattice_rng.h>

Inheritance diagram for GridSerialRNG:
GridRNGbase

Public Member Functions

 GridSerialRNG ()
template<class sobj, class distribution>
void fill (sobj &l, std::vector< distribution > &dist)
template<class distribution>
void fill (ComplexF &l, std::vector< distribution > &dist)
template<class distribution>
void fill (ComplexD &l, std::vector< distribution > &dist)
template<class distribution>
void fill (RealF &l, std::vector< distribution > &dist)
template<class distribution>
void fill (RealD &l, std::vector< distribution > &dist)
template<class distribution>
void fill (vComplexF &l, std::vector< distribution > &dist)
template<class distribution>
void fill (vComplexD &l, std::vector< distribution > &dist)
template<class distribution>
void fill (vRealF &l, std::vector< distribution > &dist)
template<class distribution>
void fill (vRealD &l, std::vector< distribution > &dist)
void SeedFixedIntegers (const std::vector< int > &seeds)
void SeedUniqueString (const std::string &s)
void GetState (std::vector< RngStateType > &saved, RngEngine &eng)
void GetState (std::vector< RngStateType > &saved, int gen)
void SetState (std::vector< RngStateType > &saved, RngEngine &eng)
void SetState (std::vector< RngStateType > &saved, int gen)
void SetEngine (RngEngine &Eng, int gen)
void GetEngine (RngEngine &Eng, int gen)
template<class source>
void Seed (source &src, int gen)

Static Public Member Functions

static RngEngine Reseed (RngEngine &eng)
static RngEngine Reseed (RngEngine &eng, std::vector< uint32_t > &newseed, std::uniform_int_distribution< uint32_t > &uid)

Data Fields

std::vector< RngEngine > _generators
std::vector< std::uniform_real_distribution< RealD > > _uniform
std::vector< std::normal_distribution< RealD > > _gaussian
std::vector< std::discrete_distribution< int32_t > > _bernoulli
std::vector< std::uniform_int_distribution< uint32_t > > _uid

Detailed Description

Definition at line 244 of file Lattice_rng.h.

Constructor & Destructor Documentation

◆ GridSerialRNG()

GridSerialRNG::GridSerialRNG ( )
inline

Member Function Documentation

◆ fill() [1/9]

template<class sobj, class distribution>
void GridSerialRNG::fill ( sobj & l,
std::vector< distribution > & dist )
inline

◆ fill() [2/9]

template<class distribution>
void GridSerialRNG::fill ( ComplexF & l,
std::vector< distribution > & dist )
inline

◆ fill() [3/9]

template<class distribution>
void GridSerialRNG::fill ( ComplexD & l,
std::vector< distribution > & dist )
inline

◆ fill() [4/9]

template<class distribution>
void GridSerialRNG::fill ( RealF & l,
std::vector< distribution > & dist )
inline

◆ fill() [5/9]

template<class distribution>
void GridSerialRNG::fill ( RealD & l,
std::vector< distribution > & dist )
inline

◆ fill() [6/9]

template<class distribution>
void GridSerialRNG::fill ( vComplexF & l,
std::vector< distribution > & dist )
inline

◆ fill() [7/9]

template<class distribution>
void GridSerialRNG::fill ( vComplexD & l,
std::vector< distribution > & dist )
inline

◆ fill() [8/9]

template<class distribution>
void GridSerialRNG::fill ( vRealF & l,
std::vector< distribution > & dist )
inline

◆ fill() [9/9]

template<class distribution>
void GridSerialRNG::fill ( vRealD & l,
std::vector< distribution > & dist )
inline

◆ SeedFixedIntegers()

void GridSerialRNG::SeedFixedIntegers ( const std::vector< int > & seeds)
inline

Definition at line 326 of file Lattice_rng.h.

References CartesianCommunicator::BroadcastWorld(), and GridRNGbase::Seed().

Referenced by SeedUniqueString().

◆ SeedUniqueString()

void GridSerialRNG::SeedUniqueString ( const std::string & s)
inline

Definition at line 332 of file Lattice_rng.h.

References GridLogMessage, SeedFixedIntegers(), and GridChecksum::sha256_seeds().

◆ Reseed() [1/2]

RngEngine GridRNGbase::Reseed ( RngEngine & eng)
inlinestaticinherited

Definition at line 189 of file Lattice_rng.h.

References Reseed().

Referenced by Reseed().

◆ Reseed() [2/2]

RngEngine GridRNGbase::Reseed ( RngEngine & eng,
std::vector< uint32_t > & newseed,
std::uniform_int_distribution< uint32_t > & uid )
inlinestaticinherited

Definition at line 195 of file Lattice_rng.h.

◆ GetState() [1/2]

void GridRNGbase::GetState ( std::vector< RngStateType > & saved,
RngEngine & eng )
inlineinherited

Definition at line 208 of file Lattice_rng.h.

Referenced by GetState(), and BinaryIO::writeRNG().

◆ GetState() [2/2]

void GridRNGbase::GetState ( std::vector< RngStateType > & saved,
int gen )
inlineinherited

Definition at line 217 of file Lattice_rng.h.

References _generators, and GetState().

◆ SetState() [1/2]

void GridRNGbase::SetState ( std::vector< RngStateType > & saved,
RngEngine & eng )
inlineinherited

Definition at line 220 of file Lattice_rng.h.

Referenced by BinaryIO::readRNG(), and SetState().

◆ SetState() [2/2]

void GridRNGbase::SetState ( std::vector< RngStateType > & saved,
int gen )
inlineinherited

Definition at line 229 of file Lattice_rng.h.

References _generators, and SetState().

◆ SetEngine()

void GridRNGbase::SetEngine ( RngEngine & Eng,
int gen )
inlineinherited

Definition at line 232 of file Lattice_rng.h.

References _generators.

◆ GetEngine()

void GridRNGbase::GetEngine ( RngEngine & Eng,
int gen )
inlineinherited

Definition at line 235 of file Lattice_rng.h.

References _generators.

◆ Seed()

template<class source>
void GridRNGbase::Seed ( source & src,
int gen )
inlineinherited

Definition at line 238 of file Lattice_rng.h.

References _generators.

Referenced by GridSerialRNG::SeedFixedIntegers().

Field Documentation

◆ _generators

◆ _uniform

std::vector<std::uniform_real_distribution<RealD> > GridRNGbase::_uniform
inherited

◆ _gaussian

std::vector<std::normal_distribution<RealD> > GridRNGbase::_gaussian
inherited

◆ _bernoulli

std::vector<std::discrete_distribution<int32_t> > GridRNGbase::_bernoulli
inherited

◆ _uid

std::vector<std::uniform_int_distribution<uint32_t> > GridRNGbase::_uid
inherited

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