The class template is a model of . More...
#include <discard_block.hpp>
Public Types | |
typedef UniformRandomNumberGenerator | base_type |
typedef base_type::result_type | result_type |
Public Member Functions | |
BOOST_STATIC_CONSTANT (std::size_t, block_size=p) | |
BOOST_STATIC_CONSTANT (std::size_t, used_block=r) | |
BOOST_STATIC_CONSTANT (bool, has_fixed_range=false) | |
BOOST_STATIC_CONSTANT (std::size_t, total_block=p) | |
BOOST_STATIC_CONSTANT (std::size_t, returned_block=r) | |
BOOST_STATIC_ASSERT (total_block >=returned_block) | |
discard_block_engine () | |
Uses the default seed for the base generator. More... | |
discard_block_engine (const base_type &rng) | |
Constructs a new with a copy of rng. More... | |
discard_block_engine (base_type &&rng) | |
Constructs a new with rng. More... | |
BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR (discard_block_engine, seed_type, value) | |
Creates a new and seeds the underlying generator with value . More... | |
BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR (discard_block_engine, SeedSeq, seq) | |
Creates a new and seeds the underlying generator with seq . More... | |
template<class It > | |
discard_block_engine (It &first, It last) | |
Creates a new and seeds the underlying generator with first and last. More... | |
void | seed () |
default seeds the underlying generator. More... | |
BOOST_RANDOM_DETAIL_ARITHMETIC_SEED (discard_block_engine, seed_type, s) | |
Seeds the underlying generator with s. More... | |
BOOST_RANDOM_DETAIL_SEED_SEQ_SEED (discard_block_engine, SeedSeq, seq) | |
Seeds the underlying generator with seq. More... | |
template<class It > | |
void | seed (It &first, It last) |
Seeds the underlying generator with first and last. More... | |
const base_type & | base () const |
Returns the underlying engine. More... | |
result_type | operator() () |
Returns the next value of the generator. More... | |
void | discard (boost::uintmax_t z) |
template<class It > | |
void | generate (It first, It last) |
Static Public Member Functions | |
static result_type min | BOOST_PREVENT_MACRO_SUBSTITUTION () |
Returns the smallest value that the generator can produce. More... | |
static result_type max | BOOST_PREVENT_MACRO_SUBSTITUTION () |
Returns the largest value that the generator can produce. More... | |
Friends | |
template<class CharT , class Traits > | |
std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &os, const discard_block_engine &s) |
Writes a to a std::ostream . More... | |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, discard_block_engine &s) |
Reads a from a std::istream . More... | |
bool | operator== (const discard_block_engine &x, const discard_block_engine &y) |
Returns true if the two generators will produce identical sequences. More... | |
bool | operator!= (const discard_block_engine &x, const discard_block_engine &y) |
Returns true if the two generators will produce different sequences. More... | |
The class template is a model of .
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
typedef UniformRandomNumberGenerator boost::random::discard_block_engine< UniformRandomNumberGenerator, p, r >::base_type |
typedef base_type::result_type boost::random::discard_block_engine< UniformRandomNumberGenerator, p, r >::result_type |
|
inline |
Uses the default seed for the base generator.
|
inlineexplicit |
Constructs a new with a copy of rng.
|
inlineexplicit |
Constructs a new with rng.
|
inline |
Creates a new and seeds the underlying generator with first and last.
|
inline |
Returns the underlying engine.
|
inlinestatic |
Returns the smallest value that the generator can produce.
This is the same as the minimum of the underlying generator.
References boost::accumulators::extract::min.
|
inlinestatic |
Returns the largest value that the generator can produce.
This is the same as the maximum of the underlying generator.
References boost::accumulators::extract::max.
|
inline |
Creates a new and seeds the underlying generator with value
.
References boost::program_options::value().
|
inline |
Seeds the underlying generator with s.
References boost::asio::s.
|
inline |
Creates a new and seeds the underlying generator with seq
.
|
inline |
Seeds the underlying generator with seq.
boost::random::discard_block_engine< UniformRandomNumberGenerator, p, r >::BOOST_STATIC_ASSERT | ( | total_block >= | returned_block | ) |
boost::random::discard_block_engine< UniformRandomNumberGenerator, p, r >::BOOST_STATIC_CONSTANT | ( | std::size_t | , |
block_size | = p |
||
) |
boost::random::discard_block_engine< UniformRandomNumberGenerator, p, r >::BOOST_STATIC_CONSTANT | ( | std::size_t | , |
used_block | = r |
||
) |
boost::random::discard_block_engine< UniformRandomNumberGenerator, p, r >::BOOST_STATIC_CONSTANT | ( | bool | , |
has_fixed_range | = false |
||
) |
boost::random::discard_block_engine< UniformRandomNumberGenerator, p, r >::BOOST_STATIC_CONSTANT | ( | std::size_t | , |
total_block | = p |
||
) |
boost::random::discard_block_engine< UniformRandomNumberGenerator, p, r >::BOOST_STATIC_CONSTANT | ( | std::size_t | , |
returned_block | = r |
||
) |
|
inline |
|
inline |
References boost::range::generate().
|
inline |
Returns the next value of the generator.
References boost::multiprecision::backends::i.
|
inline |
default seeds the underlying generator.
|
inline |
Seeds the underlying generator with first and last.
|
friend |
Returns true if the two generators will produce different sequences.
|
friend |
Writes a to a std::ostream
.
|
friend |
Returns true if the two generators will produce identical sequences.
|
friend |
Reads a from a std::istream
.