vSMC
vSMC: Scalable Monte Carlo
Public Types | Public Member Functions | List of all members
vsmc::U01SequenceSystematic< RNGType, RealType > Class Template Reference

Generate a fixed length sequence of uniform \([0,1)\) random variates by systematic sampling. More...

#include <vsmc/rng/u01_sequence.hpp>

Public Types

using result_type = RealType
 

Public Member Functions

 U01SequenceSystematic (std::size_t N, RNGType &rng)
 
result_type operator() (std::size_t n)
 
result_type operator[] (std::size_t n)
 

Detailed Description

template<typename RNGType, typename RealType = double>
class vsmc::U01SequenceSystematic< RNGType, RealType >

Generate a fixed length sequence of uniform \([0,1)\) random variates by systematic sampling.

This is similar to U01SequenceSorted except that, instead of generating the sequence as if by sorting. It is done by generating \(u_i = U / N + (i - 1) / N\) where \(U\) is uniform \([0,1)\) random variates and it is generated only once for all \(i\).

Definition at line 226 of file u01_sequence.hpp.

Member Typedef Documentation

template<typename RNGType, typename RealType = double>
using vsmc::U01SequenceSystematic< RNGType, RealType >::result_type = RealType

Definition at line 229 of file u01_sequence.hpp.

Constructor & Destructor Documentation

template<typename RNGType, typename RealType = double>
vsmc::U01SequenceSystematic< RNGType, RealType >::U01SequenceSystematic ( std::size_t  N,
RNGType &  rng 
)
inline

Definition at line 231 of file u01_sequence.hpp.

Member Function Documentation

template<typename RNGType, typename RealType = double>
result_type vsmc::U01SequenceSystematic< RNGType, RealType >::operator() ( std::size_t  n)
inline

Definition at line 251 of file u01_sequence.hpp.

template<typename RNGType, typename RealType = double>
result_type vsmc::U01SequenceSystematic< RNGType, RealType >::operator[] ( std::size_t  n)
inline

Definition at line 238 of file u01_sequence.hpp.