QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
Ranlux64UniformRng< P, R > Class Template Reference

Uniform random number generator. More...

#include <ranluxuniformrng.hpp>

+ Collaboration diagram for Ranlux64UniformRng< P, R >:

Public Types

typedef Sample< Realsample_type
 

Public Member Functions

 Ranlux64UniformRng (std::uint_fast64_t seed=19780503U)
 
sample_type next () const
 

Private Types

typedef std::subtract_with_carry_engine< std::uint_fast64_t, 48, 10, 24 > ranlux64_base_01
 

Private Attributes

const double nx = 1.0/(std::uint_fast64_t(1) << 48)
 
std::discard_block_engine< ranlux64_base_01, P, R > ranlux_
 

Detailed Description

template<std::size_t P, std::size_t R>
class QuantLib::Ranlux64UniformRng< P, R >

Uniform random number generator.

M. Luescher's "luxury" random number generator

Implementation is a proxy for the corresponding boost random number generator. For more detail see the boost documentation and: M.Luescher, A portable high-quality random number generator for lattice field theory simulations, Comp. Phys. Comm. 79 (1994) 100

Available luxury levels: Ranlux3: Any theoretically possible correlations have very small change of being observed. Ranlux4: highest possible luxury.

Definition at line 47 of file ranluxuniformrng.hpp.

Member Typedef Documentation

◆ sample_type

Definition at line 49 of file ranluxuniformrng.hpp.

◆ ranlux64_base_01

typedef std::subtract_with_carry_engine<std::uint_fast64_t, 48, 10, 24> ranlux64_base_01
private

Definition at line 59 of file ranluxuniformrng.hpp.

Constructor & Destructor Documentation

◆ Ranlux64UniformRng()

Ranlux64UniformRng ( std::uint_fast64_t  seed = 19780503U)
explicit

Definition at line 51 of file ranluxuniformrng.hpp.

Member Function Documentation

◆ next()

sample_type next ( ) const

Definition at line 54 of file ranluxuniformrng.hpp.

Member Data Documentation

◆ nx

const double nx = 1.0/(std::uint_fast64_t(1) << 48)
private

Definition at line 57 of file ranluxuniformrng.hpp.

◆ ranlux_

std::discard_block_engine<ranlux64_base_01, P, R> ranlux_
mutableprivate

Definition at line 60 of file ranluxuniformrng.hpp.