std::shuffle_order_engine<Engine,K>:: seed
From cppreference.net
<
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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bit manipulation (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Saturation arithmetic (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style checked integer arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Pseudo-random number generation
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::shuffle_order_engine
| Member functions | ||||
|
shuffle_order_engine::seed
|
||||
| Generation | ||||
| Characteristics | ||||
| Non-member functions | ||||
|
(C++11)
(C++11)
(until C++20)
|
||||
|
(C++11)
(C++11)
|
|
void
seed
(
)
;
|
(1) | (C++11以降) |
|
void
seed
(
result_type value
)
;
|
(2) | (C++11以降) |
|
template
<
class
SeedSeq
>
void seed ( SeedSeq & seq ) ; |
(3) | (C++11以降) |
基盤となるエンジンの内部状態を新しいシード値を使用して再初期化します。
1)
基盤となるエンジンをデフォルトのシード値で初期化します。実質的には
e.
seed
(
)
を呼び出します。ここで
e
は基盤となるエンジンを指します。
2)
基盤となるエンジンにシード値
value
を設定します。実質的には
e.
seed
(
value
)
を呼び出します。ここで
e
は基盤となるエンジンを表します。
3)
基盤エンジンをシードシーケンス
seq
で初期化します。実質的には
e.
seed
(
seq
)
を呼び出します。ここで
e
は基盤エンジンを指します。
パラメータ
| value | - | 基盤エンジンの内部状態の初期化に使用するシード値 |
| seq | - | 基盤エンジンの内部状態の初期化に使用するシードシーケンス |
例外
不具合報告
以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。
| DR | 適用対象 | 公開時の動作 | 正しい動作 |
|---|---|---|---|
| LWG 2181 | C++11 |
オーバーロード
(
3
)
は
seq.generate
呼び出しが例外をスローしても例外をスローしない
|
例外を伝播する |