vSMC
vSMC: Scalable Monte Carlo
Classes | Public Types | Public Member Functions | Friends | List of all members
vsmc::UniformRealLRDistribution< RealType, Left, Right > Class Template Reference

Uniform real distribution with open/closed variants. More...

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

Classes

class  param_type
 

Public Types

using distribution_type = UniformRealLRDistribution< RealType, Left, Right >
 
using result_type = RealType
 

Public Member Functions

 UniformRealLRDistribution (result_type a=0, result_type b=1)
 
 UniformRealLRDistribution (const param_type &param)
 
result_type a () const
 
result_type b () const
 
result_type max () const
 
result_type min () const
 
template<typename RNGType >
result_type operator() (RNGType &rng)
 
template<typename RNGType >
result_type operator() (RNGType &rng, const param_type &param)
 
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)
 
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 RealType, typename Left, typename Right>
class vsmc::UniformRealLRDistribution< RealType, Left, Right >

Uniform real distribution with open/closed variants.

Template Parameters
RealTypeThe floating points type of results
LeftShall the left side of the interval be Open or Closed
RightShall the right side of the interval be Open or Closed

Definition at line 515 of file common.hpp.

Member Typedef Documentation

template<typename RealType , typename Left , typename Right >
using vsmc::UniformRealLRDistribution< RealType, Left, Right >::distribution_type = UniformRealLRDistribution<RealType, Left, Right>

Definition at line 57 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
using vsmc::UniformRealLRDistribution< RealType, Left, Right >::result_type = RealType

Definition at line 56 of file uniform_real_distribution.hpp.

Constructor & Destructor Documentation

template<typename RealType , typename Left , typename Right >
vsmc::UniformRealLRDistribution< RealType, Left, Right >::UniformRealLRDistribution ( result_type  a = 0,
result_type  b = 1 
)
inlineexplicit

Definition at line 140 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
vsmc::UniformRealLRDistribution< RealType, Left, Right >::UniformRealLRDistribution ( const param_type param)
inlineexplicit

Definition at line 145 of file uniform_real_distribution.hpp.

Member Function Documentation

template<typename RealType , typename Left , typename Right >
result_type vsmc::UniformRealLRDistribution< RealType, Left, Right >::a ( ) const
inline

Definition at line 149 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
result_type vsmc::UniformRealLRDistribution< RealType, Left, Right >::b ( ) const
inline

Definition at line 150 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
result_type vsmc::UniformRealLRDistribution< RealType, Left, Right >::max ( ) const
inline

Definition at line 153 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
result_type vsmc::UniformRealLRDistribution< RealType, Left, Right >::min ( ) const
inline

Definition at line 152 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
template<typename RNGType >
result_type vsmc::UniformRealLRDistribution< RealType, Left, Right >::operator() ( RNGType &  rng)
inline

Definition at line 158 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
template<typename RNGType >
result_type vsmc::UniformRealLRDistribution< RealType, Left, Right >::operator() ( RNGType &  rng,
const param_type param 
)
inline

Definition at line 164 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
template<typename RNGType >
void vsmc::UniformRealLRDistribution< RealType, Left, Right >::operator() ( RNGType &  rng,
std::size_t  n,
result_type r 
)
inline

Definition at line 172 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
template<typename RNGType >
void vsmc::UniformRealLRDistribution< RealType, Left, Right >::operator() ( RNGType &  rng,
std::size_t  n,
result_type r,
const param_type param 
)
inline

Definition at line 178 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
void vsmc::UniformRealLRDistribution< RealType, Left, Right >::reset ( )
inline

Definition at line 155 of file uniform_real_distribution.hpp.

Friends And Related Function Documentation

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

Definition at line 185 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
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 185 of file uniform_real_distribution.hpp.

template<typename RealType , typename Left , typename Right >
bool operator== ( const distribution_type dist1,
const distribution_type dist2 
)
friend

Definition at line 185 of file uniform_real_distribution.hpp.

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

Definition at line 185 of file uniform_real_distribution.hpp.