std::shuffle_order_engine<Engine,K>:: shuffle_order_engine
From cppreference.com
<
cpp
|
numeric
|
random
|
shuffle order 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::shuffle_order_engine
Member functions | ||||
shuffle_order_engine::shuffle_order_engine
|
||||
Generation | ||||
Characteristics | ||||
Non-member functions | ||||
(C++11)
(C++11)
(until C++20)
|
||||
(C++11)
(C++11)
|
shuffle_order_engine
(
)
;
|
(1) | (since C++11) |
explicit
shuffle_order_engine
(
result_type s
)
;
|
(2) | (since C++11) |
template
<
class
SeedSeq
>
explicit shuffle_order_engine ( SeedSeq & seq ) ; |
(3) | (since C++11) |
explicit
shuffle_order_engine
(
const
Engine
&
e
)
;
|
(4) | (since C++11) |
explicit
shuffle_order_engine
(
Engine
&&
e
)
;
|
(5) | (since C++11) |
Constructs new pseudo-random engine adaptor.
1)
Default constructor. The underlying engine is also default-constructed.
2)
Constructs the underlying engine with
s
.
3)
Constructs the underlying engine with seed sequence
seq
.
This overload participates in overload resolution only if
Sseq
satisfies the requirements of
SeedSequence
.
4)
Constructs the underlying engine with a copy of
e
.
5)
Move-constructs the underlying engine with
e
.
e
holds unspecified, but valid state afterwards.
Parameters
s | - | integer value to construct the underlying engine with |
seq | - | seed sequence to construct the underlying engine with |
e | - | pseudo-random number engine to initialize with |
Exceptions
Example
Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 2181 | C++11 |
overload
(
3
)
would not throw even if the
seq.generate
call throws
|
propagates the exception |
Retrieved from "
https://en.cppreference.com/mwiki/index.php?title=cpp/numeric/random/shuffle_order_engine/shuffle_order_engine&oldid=132170
"