std::shuffle_order_engine
來自 cppreference.com
定義於標頭檔案 <random> |
||
template< class Engine, |
(C++11 起) | |
shuffle_order_engine
是一個隨機數引擎介面卡,它對基引擎生成的隨機數進行混洗。它維護一個大小為 K 的表,並在請求時從該表中提供一個隨機選擇的數字,同時將其替換為基引擎生成的數字。
以下 typedef 定義了具有一個常用引數集的隨機數引擎
定義於標頭檔案
<random> | |
型別 | 定義 |
knuth_b (C++11) |
std::shuffle_order_engine<std::minstd_rand0, 256> |
目錄 |
[編輯] 模板引數
Engine | - | 被包裝引擎的型別 |
K | - | 內部表的大小。必須大於 0。 |
型別要求 | ||
-Engine 必須滿足 RandomNumberEngine 的要求。 |
[編輯] 成員型別
成員型別 | 定義 |
result_type (C++11) |
Engine::result_type
|
[編輯] 成員函式
(C++11) |
構造引擎介面卡 (public member function) |
(C++11) |
設定底層引擎的狀態 (public member function) |
(C++11) |
返回底層引擎 (public member function) |
生成 | |
(C++11) |
推進底層引擎的狀態並返回生成的值 (public member function) |
(C++11) |
按指定量推進介面卡的狀態 (public member function) |
特性 | |
[靜態] (C++11) |
獲取底層引擎輸出範圍內的最小可能值。 (public static member function) |
[靜態] (C++11) |
獲取底層引擎輸出範圍內的最大可能值。 (public static member function) |
[編輯] 非成員函式
(C++11起)(C++11起)(C++20中移除) |
比較介面卡和底層引擎的內部狀態 (function) |
(C++11) |
對偽隨機數引擎介面卡執行流輸入和輸出 (function) |
[編輯] 成員物件
constexpr size_t table_size [靜態] (C++11) |
內部表的大小,K (public static 成員常量) |
[編輯] 示例
本節不完整 原因:無示例 |