pseudo.rngWELL(rngWELL)
pseudo.rngWELL()所属R语言包:rngWELL
Toolbox for pseudo and quasi random number generation
伪和准随机数生成的工具箱
译者:生物统计家园网 机器人LoveR
描述----------Description----------
General linear congruential generators such as Park Miller sequence, generalized feedback shift register such as SF-Mersenne Twister algorithm and WELL generator; and a quasi random generator (pseudo random generators) and the Torus algorithm (quasi random generation).
一般线性同余发生器,如公园米勒序列,广义反馈移位寄存器如SF-梅森Twister算法和良好发生器和一个准随机数发生器(伪随机发生器)和圆环算法(准随机生成的)。
用法----------Usage----------
WELL2test(n, dim = 1, order = 512, temper = FALSE, version = "a")
setSeed4WELL(seed)
参数----------Arguments----------
参数:n
number of observations. If length(n) > 1, the length is taken to be the required number.
若干意见。如果长度(n)> 1时,所需的号码的长度被取为。
参数:dim
dimension of observations (must be <=100 000, default 1).
尺寸的意见(必须<= 100 000,默认为1)。
参数:seed
a single value, interpreted as a positive integer for the seed. e.g. append your day, your month and your year of birth.
一个单一的值,解释为一个正整数的种子。例如追加新的一天,这一个月,您的出生年份。
参数:order
a positive integer for the order of the characteristic polynomial. see details
的特征多项式的顺序的正整数。详情请参阅
参数:temper
a logical if you want to do a tempering stage. see details
一个逻辑,如果你想要做一个锻炼阶段。详情请参阅
参数:version
a character either 'a' or 'b'. see details
字符A或B。详情请参阅
Details
详细信息----------Details----------
The currently available generator are given below.
当前可用的发生器在下面给出。
The WELL (which stands for Well Equidistributed Long-period Linear) is in a sentence a generator with better equidistribution than Mersenne Twister algorithm but this gain of quality has to be paid by a slight higher cost of time. See Panneton et al. (2006) for details.
井(代表为好Equidistributed的长周期线性)是一台发电机更好地比Mersenne Twister算法,但这个增益的质量应支付的轻微成本较高,时间等分布在一个句子里。见Panneton等。 (2006年)的详细信息。
The order argument of WELL generator is the order of the characteristic polynomial, which is denoted by k in Paneton F., L'Ecuyer P. and Matsumoto M. (2006). Possible values for order are 512, 521, 607, 1024 where no tempering are needed (thus possible). Order can also be 800, 19937, 21071, 23209, 44497 where a tempering stage is possible through the temper argument. Furthermore a possible 'b' version of WELL RNGs are possible for the following order 521, 607, 1024, 800, 19937, 23209 with the version argument.
order参数WELL发生器是的特征多项式表示,这是为了kPaneton F.,LEcuyer P.和松本M.(2006)的。可能的值order是512,521,607,1024没有回火(因此可能)。命令也可以是800,19937,21071,23209,44497,回火阶段可能是通过temper参数。另外一个可能的“B”版良好的随机数据生成器,可以按以下顺序521,607,1024,800,19937,23209version参数。
All the C code for WELL generator used in this package is the code of P. L'Ecuyer (cf. http://www.iro.umontreal.ca/~lecuyer/), except
所有的C代码WELL在此包中使用的发电机是P. LEcuyer的代码(参见http://www.iro.umontreal.ca/ lecuyer /),除
See the pdf vignette for details.
有关详细信息,查看PDF的小插曲。
值----------Value----------
WELL2test generates random variables in [0,1[. It returns a nxdim matrix, when dim>1 otherwise a vector of length n.
WELL2test随机变量在区间[0,1 [。它返回一个nXdim矩阵,当dim> 1,否则的向量长度n。
setSeed4WELL set the seed of the rngWELL package (i.e. for the WELL2test functions).
setSeed4WELL设置rngWELL包(即WELL2test函数)的种子。
(作者)----------Author(s)----------
Christophe Dutang and Petr Savicky
参考文献----------References----------
Based on Linear Recurrences Modulo 2, ACM Transactions on Mathematical Software. (preprint available online)
参见----------See Also----------
.Random.seed for what is done in R about random number generation.
.Random.seed是在R关于随机数生成。
实例----------Examples----------
# (1) WELL generator[(1)良好的发电机]
#[]
# 'basic' calls[“基本”要求]
# WELL512[WELL512]
WELL2test(10, order = 512)
# WELL1024[WELL1024]
WELL2test(10, order = 1024)
# WELL19937[WELL19937]
WELL2test(10, order = 19937)
# WELL44497[WELL44497]
WELL2test(10, order = 44497)
# WELL19937 with tempering [WELL19937与回火]
WELL2test(10, order = 19937, temper = TRUE)
# WELL44497 with tempering[WELL44497与回火]
WELL2test(10, order = 44497, temper = TRUE)
# tempering vs no tempering[锻炼与不锻炼]
setSeed4WELL(08082008)
WELL2test(10, order =19937)
setSeed4WELL(08082008)
WELL2test(10, order =19937, temper=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|