This documentation is archived and is not being maintained.

xor_combine Class

Generates a combined distribution.

template<class Engine1, int S1,
   class Engine2, int S2>
   class xor_combine {
   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(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()();
   base1_type stored_eng1;     // exposition only
   base2_type stored_eng2;     // exposition only


The type of the first random engine.


The shift count for the first random engine.


The type of the second random engine.


The shift count for the second random engine.

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.

Header: <random>

Namespace: std::tr1