vSMC
vSMC: Scalable Monte Carlo
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 > Class Template Reference

Combine two RNG engines using XOR. More...

#include <vsmc/rng/xor_combine_engine.hpp>

Public Types

typedef Eng1 engine1_type
 
typedef Eng2 engine2_type
 
typedef Eng1::result_type result_type
 

Public Member Functions

 XorCombineEngine (result_type s=1)
 
template<typename SeedSeq >
 XorCombineEngine (SeedSeq &seq, typename cxx11::enable_if< internal::is_seed_seq< SeedSeq, result_type, XorCombineEngine< Eng1, Eng2, S1, S2 > >::value >::type *=nullptr)
 
void discard (std::size_t nskip)
 
engine1_typeeng1 ()
 
engine2_typeeng2 ()
 
result_type operator() ()
 
void seed (result_type s)
 
template<typename SeedSeq >
void seed (SeedSeq &seq, typename cxx11::enable_if< internal::is_seed_seq< SeedSeq, result_type, XorCombineEngine< Eng1, Eng2, S1, S2 > >::value >::type *=nullptr)
 

Static Public Member Functions

static constexpr result_type max ()
 
static constexpr result_type min ()
 

Friends

bool operator!= (const XorCombineEngine< Eng1, Eng2, S1, S2 > &eng1, const XorCombineEngine< Eng1, Eng2, S1, S2 > &eng2)
 
template<typename CharT , typename Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const XorCombineEngine< Eng1, Eng2, S1, S2 > &eng)
 
bool operator== (const XorCombineEngine< Eng1, Eng2, S1, S2 > &eng1, const XorCombineEngine< Eng1, Eng2, S1, S2 > &eng2)
 
template<typename CharT , typename Traits >
std::basic_istream< CharT, Traits > & operator>> (std::basic_istream< CharT, Traits > &is, XorCombineEngine< Eng1, Eng2, S1, S2 > &eng)
 

Detailed Description

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
class vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >

Combine two RNG engines using XOR.

Definition at line 57 of file xor_combine_engine.hpp.

Member Typedef Documentation

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
typedef Eng1 vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::engine1_type

Definition at line 62 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
typedef Eng2 vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::engine2_type

Definition at line 63 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
typedef Eng1::result_type vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::result_type

Definition at line 61 of file xor_combine_engine.hpp.

Constructor & Destructor Documentation

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::XorCombineEngine ( result_type  s = 1)
inlineexplicit

Definition at line 65 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
template<typename SeedSeq >
vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::XorCombineEngine ( SeedSeq &  seq,
typename cxx11::enable_if< internal::is_seed_seq< SeedSeq, result_type, XorCombineEngine< Eng1, Eng2, S1, S2 > >::value >::type = nullptr 
)
inlineexplicit

Definition at line 69 of file xor_combine_engine.hpp.

Member Function Documentation

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
void vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::discard ( std::size_t  nskip)
inline

Definition at line 109 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
engine1_type& vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::eng1 ( )
inline

Definition at line 91 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
engine2_type& vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::eng2 ( )
inline

Definition at line 93 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
static constexpr result_type vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::max ( )
inlinestatic

Definition at line 101 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
static constexpr result_type vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::min ( )
inlinestatic

Definition at line 95 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
result_type vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::operator() ( )
inline

Definition at line 107 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
void vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::seed ( result_type  s)
inline

Definition at line 75 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
template<typename SeedSeq >
void vsmc::XorCombineEngine< Eng1, Eng2, S1, S2 >::seed ( SeedSeq &  seq,
typename cxx11::enable_if< internal::is_seed_seq< SeedSeq, result_type, XorCombineEngine< Eng1, Eng2, S1, S2 > >::value >::type = nullptr 
)
inline

Definition at line 82 of file xor_combine_engine.hpp.

Friends And Related Function Documentation

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
bool operator!= ( const XorCombineEngine< Eng1, Eng2, S1, S2 > &  eng1,
const XorCombineEngine< Eng1, Eng2, S1, S2 > &  eng2 
)
friend

Definition at line 120 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
template<typename CharT , typename Traits >
std::basic_ostream<CharT, Traits>& operator<< ( std::basic_ostream< CharT, Traits > &  os,
const XorCombineEngine< Eng1, Eng2, S1, S2 > &  eng 
)
friend

Definition at line 126 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
bool operator== ( const XorCombineEngine< Eng1, Eng2, S1, S2 > &  eng1,
const XorCombineEngine< Eng1, Eng2, S1, S2 > &  eng2 
)
friend

Definition at line 115 of file xor_combine_engine.hpp.

template<typename Eng1, typename Eng2, typename Eng1::result_type S1 = 0, typename Eng2::result_type S2 = 0>
template<typename CharT , typename Traits >
std::basic_istream<CharT, Traits>& operator>> ( std::basic_istream< CharT, Traits > &  is,
XorCombineEngine< Eng1, Eng2, S1, S2 > &  eng 
)
friend

Definition at line 139 of file xor_combine_engine.hpp.