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
    第一个随机的引擎的shift计数。

  • Engine2
    第二个随机的引擎的类型。

  • S2
    第二个随机的引擎的shift计数。

备注

模板选件类描述通过合并两个引擎将生成的值生成值的一台复式引擎。引擎处理状态是 stored_eng1 状态。stored_eng2状态。

要求

标头: <random>

命名空间: std

请参见

参考

<random>

xor_combine::base1

xor_combine::base1_type

xor_combine::base2

xor_combine::base2_type

xor_combine::operator()

xor_combine::seed

xor_combine::xor_combine