![]() |
Home | Libraries | People | FAQ | More |
boost::random::discard_block_engine
// In header: <boost/random/discard_block.hpp> template<typename UniformRandomNumberGenerator, p, r> class discard_block_engine { public: // types typedef ; typedef ; // construct/copy/destruct (); (); (); (); template<typename SeedSeq> (); template<typename It> (, ); // public member functions (); (); template<typename SeedSeq> (); template<typename It> (, ); () ; (); (); template<typename It> (, ); // public static functions (); (); // friend functions template<typename CharT, typename Traits> (, discard_block_engine &); template<typename CharT, typename Traits> (, discard_block_engine &); (discard_block_engine &, discard_block_engine &); (discard_block_engine &, discard_block_engine &); // public data members static block_size; static used_block; static has_fixed_range; static total_block; static returned_block; };
The class template discard_block_engine is a model of pseudo-random number generator . It modifies another generator by discarding parts of its output. Out of every block of p
results, the first r
will be returned and the rest discarded.
Requires: 0 < p <= r
discard_block_engine
public
construct/copy/destruct();
Uses the default seed for the base generator.
( rng);
Constructs a new discard_block_engine
with a copy of rng.
( rng);
Constructs a new discard_block_engine
with rng.
( value);
Creates a new discard_block_engine
and seeds the underlying generator with value
template<typename SeedSeq> ( seq);
Creates a new discard_block_engine
and seeds the underlying generator with seq
template<typename It> ( first, last);
Creates a new discard_block_engine
and seeds the underlying generator with first and last.
discard_block_engine
public member functions();
default seeds the underlying generator.
( s);
Seeds the underlying generator with s.
template<typename SeedSeq> ( seq);
Seeds the underlying generator with seq.
template<typename It> ( first, last);
Seeds the underlying generator with first and last.
() ;
Returns the underlying engine.
();
Returns the next value of the generator.
( z);
template<typename It> ( first, last);
discard_block_engine
friend functionstemplate<typename CharT, typename Traits> ( os, discard_block_engine & s);
Writes a discard_block_engine
to a std::ostream
.
template<typename CharT, typename Traits> ( is, discard_block_engine & s);
Reads a discard_block_engine
from a std::istream
.
(discard_block_engine & x, discard_block_engine & y);
Returns true if the two generators will produce identical sequences.
(discard_block_engine & x, discard_block_engine & y);
Returns true if the two generators will produce different sequences.