Produces random numbers from some base engine by discarding blocks of data.
0 <= __r
<= __p
Definition at line 1078 of file tr1_impl/random.
typedef _UniformRandomNumberGenerator std::discard_block< _UniformRandomNumberGenerator, __p, __r >::base_type |
The type of the underlying generator engine.
Definition at line 1085 of file tr1_impl/random.
typedef base_type::result_type std::discard_block< _UniformRandomNumberGenerator, __p, __r >::result_type |
The type of the generated random value.
Definition at line 1087 of file tr1_impl/random.
std::discard_block< _UniformRandomNumberGenerator, __p, __r >::discard_block | ( | ) | [inline] |
Constructs a default discard_block engine.
The underlying engine is default constructed as well.
Definition at line 1098 of file tr1_impl/random.
std::discard_block< _UniformRandomNumberGenerator, __p, __r >::discard_block | ( | const base_type & | __rng | ) | [inline, explicit] |
Copy constructs a discard_block engine.
Copies an existing base class random number generator.
rng | An existing (base class) engine object. |
Definition at line 1108 of file tr1_impl/random.
std::discard_block< _UniformRandomNumberGenerator, __p, __r >::discard_block | ( | unsigned long | __s | ) | [inline, explicit] |
Seed constructs a discard_block engine.
Constructs the underlying generator engine seeded with __s
.
__s | A seed value for the base class engine. |
Definition at line 1118 of file tr1_impl/random.
std::discard_block< _UniformRandomNumberGenerator, __p, __r >::discard_block | ( | _Gen & | __g | ) | [inline] |
Generator construct a discard_block engine.
__g | A seed generator function. |
Definition at line 1127 of file tr1_impl/random.
const base_type& std::discard_block< _UniformRandomNumberGenerator, __p, __r >::base | ( | ) | const [inline] |
Gets a const reference to the underlying generator engine object.
Definition at line 1156 of file tr1_impl/random.
result_type std::discard_block< _UniformRandomNumberGenerator, __p, __r >::max | ( | ) | const [inline] |
Gets the maximum value in the generated random number range.
Definition at line 1170 of file tr1_impl/random.
result_type std::discard_block< _UniformRandomNumberGenerator, __p, __r >::min | ( | ) | const [inline] |
Gets the minimum value in the generated random number range.
Definition at line 1163 of file tr1_impl/random.
discard_block< _UniformRandomNumberGenerator, __p, __r >::result_type std::discard_block< _UniformRandomNumberGenerator, __p, __r >::operator() | ( | ) | [inline] |
Gets the next value in the generated random number sequence.
Definition at line 583 of file random.tcc.
void std::discard_block< _UniformRandomNumberGenerator, __p, __r >::seed | ( | _Gen & | __g | ) | [inline] |
Reseeds the discard_block object with the given seed generator function.
__g | A seed generator function. |
Definition at line 1146 of file tr1_impl/random.
void std::discard_block< _UniformRandomNumberGenerator, __p, __r >::seed | ( | ) | [inline] |
Reseeds the discard_block object with the default seed for the underlying base class generator engine.
Definition at line 1134 of file tr1_impl/random.
bool operator!= | ( | const discard_block< _UniformRandomNumberGenerator, __p, __r > & | __lhs, | |
const discard_block< _UniformRandomNumberGenerator, __p, __r > & | __rhs | |||
) | [friend] |
Compares two discard_block random number generator objects of the same type for inequality.
__lhs | A discard_block random number generator object. | |
__rhs | Another discard_block random number generator object. |
Definition at line 1204 of file tr1_impl/random.
std::basic_ostream<_CharT, _Traits>& operator<< | ( | std::basic_ostream< _CharT, _Traits > & | __os, | |
const discard_block< _UniformRandomNumberGenerator1, __p1, __r1 > & | __x | |||
) | [friend] |
Inserts the current state of a discard_block random number generator engine __x
into the output stream __os
.
__os | An output stream. | |
__x | A discard_block random number generator engine. |
__x
inserted or in an error state. bool operator== | ( | const discard_block< _UniformRandomNumberGenerator, __p, __r > & | __lhs, | |
const discard_block< _UniformRandomNumberGenerator, __p, __r > & | __rhs | |||
) | [friend] |
Compares two discard_block random number generator objects of the same type for equality.
__lhs | A discard_block random number generator object. | |
__rhs | Another discard_block random number generator object. |
Definition at line 1190 of file tr1_impl/random.
std::basic_istream<_CharT, _Traits>& operator>> | ( | std::basic_istream< _CharT, _Traits > & | __is, | |
discard_block< _UniformRandomNumberGenerator1, __p1, __r1 > & | __x | |||
) | [friend] |
Extracts the current state of a % subtract_with_carry random number generator engine __x
from the input stream __is
.
__is | An input stream. | |
__x | A discard_block random number generator engine. |
__x
extracted or in an error state.