Description

Instantiations of xor_combine model a pseudo-random number generator . To produce its output it invokes each of the base generators, shifts their results and xors them together.

xor_combine
public
construct/copy/destruct

xor_combine();

Constructors a xor_combine by default constructing both base generators.

xor_combine(const base1_type & rng1, const base2_type & rng2);

Constructs a xor_combine by copying two base generators.

xor_combine(const result_type & v);

Constructs a xor_combine, seeding both base generators with v.

template<typename It> xor_combine(It & first, It last);

Constructs a xor_combine, seeding both base generators with values from the iterator range [first, last) and changes first to point to the element after the last one used. If there are not enough elements in the range to seed both generators, throws std::invalid_argument.

xor_combine public member functions

voidseed() ;

Calls seed() for both base generators.

voidseed(const result_type & v) ;

seeds both base generators with v.

template<typename It> voidseed(It & first, It last) ;

seeds both base generators with values from the iterator range [first, last) and changes first to point to the element after the last one used. If there are not enough elements in the range to seed both generators, throws std::invalid_argument.