xor_combine Class
Generates a combined distribution.
template<class Engine1, int S1,
class Engine2, int S2>
class xor_combine {
public:
typedef Engine1 base1_type;
typedef Engine2 base2_type;
typedef typename Engine1::result_type;
static const int shift1 = S1;
static const int shift2 = S2;
xor_combine();
xor_combine(const base1_type& eng1, const base2_type& eng2);
template<class Gen>
xor_combine(Gen& gen);
xor_combine(const xor_combine& right);
xor_combine(xor_combine& right);
void seed();
template<class Gen>
void seed(Gen& gen);
const base1_type& base1() const;
const base2_type& base2() const;
result_type min() const;
result_type max() const;
result_type operator()();
private:
base1_type stored_eng1; // exposition only
base2_type stored_eng2; // exposition only
};
Parameters
Engine1
The type of the first random engine.S1
The shift count for the first random engine.Engine2
The type of the second random engine.S2
The shift count for the second random engine.
Remarks
The template class decribes a compound engine that produces values by combining values produced by two engines. The engine's state is the state of stored_eng1 followed by the state of stored_eng2.
Requirements
Header: <random>
Namespace: std