xor_combine Class
產生合併的散發。
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
};
參數
Engine1
第一個選擇性引擎的型別。S1
第一個選擇性引擎的移位計數。Engine2
第二個選擇性引擎的型別。S2
第二個選擇性引擎的移位計數。
備註
樣板類別描述透過合併兩個引擎所產生的值會產生值的部複雜式引擎。引擎的狀態為 stored_eng1 狀態中 stored_eng2狀態接續。
需求
標題: <random>
命名空間: std