Sdílet prostřednictvím


xor_combine Class

Generuje kombinované distribuce.

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
   };

Parametry

  • Engine1
    Typ motoru první náhodný.

  • S1
    Počet shift pro první motor náhodné.

  • Engine2
    Typ druhého motoru náhodné.

  • S2
    Počet shift pro druhého motoru náhodné.

Poznámky

Popsáno šablony třídy vyrobené krmných motoru, který vytváří hodnoty kombinací hodnot dvou motorů.Stav je stav stroje stored_eng1 následuje stav stored_eng2.

Požadavky

Záhlaví: <random>

Obor názvů: std

Viz také

Referenční dokumentace

<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