线性同余方法 Linear congruential generator
(重定向自Linear congruential method)
线性同余方法(LCG)是个产生伪随机数的方法。
它是根据递归公式:
其中是产生器设置的常数。
LCG的周期最大为,但大部分情况都会少于M。要令LCG达到最大周期,应符合以下条件:
-
互质;
-
的所有质因数都能整除
;
- 若
是4的倍数,
也是;
-
都比
小;
-
是正整数。
单词 | Linear congruential method |
释义 |
Linear congruential method
中文百科
线性同余方法 Linear congruential generator(重定向自Linear congruential method)
线性同余方法(LCG)是个产生伪随机数的方法。 它是根据递归公式: 其中 LCG的周期最大为
英语百科
Linear congruential generator 线性同余方法(重定向自Linear congruential method)
![]() ![]() ![]() A linear congruential generator (LCG) is an algorithm that yields a sequence of pseudo-randomized numbers calculated with a discontinuous piecewise linear equation. The method represents one of the oldest and best-known pseudorandom number generator algorithms. The theory behind them is relatively easy to understand, and they are easily implemented and fast, especially on computer hardware which can provide modulo arithmetic by storage-bit truncation. |
随便看 |
|
英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。