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

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

#include <vsmc/rng/u01_sequence.hpp>

Public Types

using result_type = RealType
 

Public Member Functions

 U01SequenceStratified (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::U01SequenceStratified< RNGType, RealType >

Generate a fixed length sequence of uniform \([0,1)\) random variates by stratified 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_i / N + (i - 1) / N\) where \(U_i\) is uniform \([0,1)\) random variates.

Definition at line 177 of file u01_sequence.hpp.

Member Typedef Documentation

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

Definition at line 180 of file u01_sequence.hpp.

Constructor & Destructor Documentation

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

Definition at line 182 of file u01_sequence.hpp.

Member Function Documentation

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

Definition at line 204 of file u01_sequence.hpp.

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

Definition at line 191 of file u01_sequence.hpp.