std::linear_congruential_engine<UIntType,a,c,m>:: discard
From cppreference.com
<
cpp
|
numeric
|
random
|
linear congruential engine
C++
Numerics library
Common mathematical functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mathematical special functions (C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mathematical constants (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Basic linear algebra algorithms (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data-parallel types (
simd
)
(C++26)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Floating-point environment (C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Complex numbers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Numeric array (
valarray
)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Pseudo-random number generation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Saturation arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bit operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pseudo-random number generation
|
|
std::linear_congruential_engine
Member functions | ||||
Generation | ||||
linear_congruential_engine::discard
|
||||
Characteristics | ||||
Non-member functions | ||||
(C++11)
(C++11)
(until C++20)
|
||||
(C++11)
(C++11)
|
void
discard
(
unsigned
long
long
z
)
;
|
||
Advances the internal state by z times.
Parameters
z | - | integer value specifying the number of times to advance the state by |
Complexity
No worse than the complexity of z consecutive calls to operator() .
Notes
This function can use “fast jump” algorithms which advance the state by many steps (order of millions) without calculating intermediate state transitions can be used instead of naive loops that calls operator() z times and discarding the result.
See also
advances the engine's state and returns the generated value
(public member function) |
Retrieved from "
https://en.cppreference.com/mwiki/index.php?title=cpp/numeric/random/linear_congruential_engine/discard&oldid=124180
"