名稱空間
變體
操作

std::philox_engine<UIntType,w,n,r,consts>::set_counter

來自 cppreference.com
< cpp‎ | 數值‎ | 隨機‎ | philox_engine
 
 
 
 
 
void set_counter( const std::array<result_type, n>& c );
(C++26 起)

設定隨機數引擎的計數器

  • 對於 k[0n) 中的每個整數,將 Xk 設定為 cn-1-k mod 2w
  • j 的值設定為 n - 1[1]
  1. 由於 j 設定為 n - 1,下一個狀態轉換總是生成新的隨機值。

[編輯] 引數

c - 用於設定計數器的計數器序列

[編輯] 複雜度

O(n)

[編輯] 參閱

構造引擎
(public member function) [編輯]
設定引擎的當前狀態
(public member function) [編輯]