Skip to content

Class TempLat::RandomGaussian

template <typename T>

ClassList > TempLat > RandomGaussian

A gaussian random variable. Is aware of its own state and counts the number of values that have been returned. More...

  • #include <randomgaussian.h>

Public Types

Type Name
typedef INT IntegerType

Public Functions

Type Name
RandomGaussian (const std::string & seed)
DEVICE_INLINE_FUNCTION T get (INT r, INT c, INT g) const
DEVICE_INLINE_FUNCTION auto getPair (INT r, INT c, INT g, bool real=false, bool unitary=false) const
auto getSeed () const
auto getSeedString () const
void loadState (const std::string & state)
Restores Gaussian RNG state from a serialized string.
std::string saveState () const
Serializes the complete Gaussian RNG state to a string.

Detailed Description

Unit test: ctest -R test-randomgaussian

Public Types Documentation

typedef IntegerType

using TempLat::RandomGaussian< T >::IntegerType =  INT;

Public Functions Documentation

function RandomGaussian

inline TempLat::RandomGaussian::RandomGaussian (
    const std::string & seed
) 

function get

inline DEVICE_INLINE_FUNCTION T TempLat::RandomGaussian::get (
    INT r,
    INT c,
    INT g
) const

function getPair

inline DEVICE_INLINE_FUNCTION auto TempLat::RandomGaussian::getPair (
    INT r,
    INT c,
    INT g,
    bool real=false,
    bool unitary=false
) const

function getSeed

inline auto TempLat::RandomGaussian::getSeed () const

function getSeedString

inline auto TempLat::RandomGaussian::getSeedString () const

function loadState

Restores Gaussian RNG state from a serialized string.

inline void TempLat::RandomGaussian::loadState (
    const std::string & state
) 

Parameters:


function saveState

Serializes the complete Gaussian RNG state to a string.

inline std::string TempLat::RandomGaussian::saveState () const

Returns:

String containing underlying uniform RNG state, counter, and Box-Muller cache


Friends Documentation

friend operator<<

inline std::ostream & TempLat::RandomGaussian::operator<< (
    std::ostream & ostream,
    const RandomGaussian & pr
) 


The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/util/random/randomgaussian.h