vSMC  v3.0.0
Scalable Monte Carlo
Classes | Public Types | Public Member Functions | Friends | List of all members
vsmc::UniformBitsDistribution< UIntType > Class Template Reference

Uniform bits distribution. More...

#include <vsmc/rng/internal/common.hpp>

Classes

class  param_type
 

Public Types

using distribution_type = UniformBitsDistribution< UIntType >
 
using result_type = UIntType
 

Public Member Functions

 UniformBitsDistribution ()=default
 
 UniformBitsDistribution (const param_type &)
 
result_type max () const
 
result_type min () const
 
template<typename RNGType >
void operator() (RNGType &rng, std::size_t n, result_type *r)
 
template<typename RNGType >
void operator() (RNGType &rng, std::size_t n, result_type *r, const param_type &param)
 
template<typename RNGType >
result_type operator() (RNGType &rng, const param_type &param)
 
template<typename RNGType >
result_type operator() (RNGType &rng)
 
void param (const param_type &param)
 
const param_typeparam () const
 
void pram (param_type &&param)
 
void reset ()
 

Friends

bool operator!= (const distribution_type &dist1, const distribution_type &dist2)
 
template<typename CharT , typename Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const distribution_type &dist)
 
bool operator== (const distribution_type &dist1, const distribution_type &dist2)
 
template<typename CharT , typename Traits >
std::basic_istream< CharT, Traits > & operator>> (std::basic_istream< CharT, Traits > &is, distribution_type &dist)
 

Detailed Description

template<typename UIntType>
class vsmc::UniformBitsDistribution< UIntType >

Uniform bits distribution.

For a given unsigned integer type UIntType with \(W\) bits, the output will be unsigned integers on the set \(\{0,\dots,2^W - 1\}\) regardless of the range of the input RNGType

Definition at line 1122 of file rng/internal/common.hpp.

Member Typedef Documentation

template<typename UIntType>
using vsmc::UniformBitsDistribution< UIntType >::distribution_type = UniformBitsDistribution< UIntType >

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
using vsmc::UniformBitsDistribution< UIntType >::result_type = UIntType

Definition at line 51 of file uniform_bits_distribution.hpp.

Constructor & Destructor Documentation

template<typename UIntType>
vsmc::UniformBitsDistribution< UIntType >::UniformBitsDistribution ( )
default
template<typename UIntType>
vsmc::UniformBitsDistribution< UIntType >::UniformBitsDistribution ( const param_type )
inlineexplicit

Definition at line 51 of file uniform_bits_distribution.hpp.

Member Function Documentation

template<typename UIntType>
result_type vsmc::UniformBitsDistribution< UIntType >::max ( ) const
inline

Definition at line 57 of file uniform_bits_distribution.hpp.

template<typename UIntType>
result_type vsmc::UniformBitsDistribution< UIntType >::min ( ) const
inline

Definition at line 55 of file uniform_bits_distribution.hpp.

template<typename UIntType>
template<typename RNGType >
result_type vsmc::UniformBitsDistribution< UIntType >::operator() ( RNGType &  rng)
inline

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
template<typename RNGType >
result_type vsmc::UniformBitsDistribution< UIntType >::operator() ( RNGType &  rng,
const param_type param 
)
inline

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
template<typename RNGType >
void vsmc::UniformBitsDistribution< UIntType >::operator() ( RNGType &  rng,
std::size_t  n,
result_type r,
const param_type param 
)
inline

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
template<typename RNGType >
void vsmc::UniformBitsDistribution< UIntType >::operator() ( RNGType &  rng,
std::size_t  n,
result_type r 
)
inline

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
const param_type& vsmc::UniformBitsDistribution< UIntType >::param ( ) const
inline

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
void vsmc::UniformBitsDistribution< UIntType >::param ( const param_type param)
inline

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
void vsmc::UniformBitsDistribution< UIntType >::pram ( param_type &&  param)
inline

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
void vsmc::UniformBitsDistribution< UIntType >::reset ( )
inline

Definition at line 59 of file uniform_bits_distribution.hpp.

Friends And Related Function Documentation

template<typename UIntType>
bool operator!= ( const distribution_type dist1,
const distribution_type dist2 
)
friend

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
template<typename CharT , typename Traits >
std::basic_ostream<CharT, Traits>& operator<< ( std::basic_ostream< CharT, Traits > &  os,
const distribution_type dist 
)
friend

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
bool operator== ( const distribution_type dist1,
const distribution_type dist2 
)
friend

Definition at line 51 of file uniform_bits_distribution.hpp.

template<typename UIntType>
template<typename CharT , typename Traits >
std::basic_istream<CharT, Traits>& operator>> ( std::basic_istream< CharT, Traits > &  is,
distribution_type dist 
)
friend

Definition at line 51 of file uniform_bits_distribution.hpp.