找回密码
 注册
查看: 344|回复: 0

R语言 snowFT包 snowFT-rand()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 11:06:14 | 显示全部楼层 |阅读模式
snowFT-rand(snowFT)
snowFT-rand()所属R语言包:snowFT

                                        Random Number Generation
                                         随机数生成器

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Initialize independent random number streams to be used in the cluster. It uses either the L'Ecuyer's random number generator (package rlecuyer required) or the SPRNG generator (package rsprng required).
初始化流中以被用于在聚类中的独立的随机数。它采用的LEcuyers随机数发生器(需要包rlecuyer)或SPRNG发生器(需要包rsprng)。


用法----------Usage----------


clusterSetupRNG.FT (cl, type = "RNGstream", streamper="replicate", ...)
clusterSetupRNGstreamRepli (cl, seed=rep(12345,6), n, ...)



参数----------Arguments----------

参数:cl
Cluster object.
聚类对象。


参数:type
Type of the RNG. "RNGstream" initializes the L'Ecuyer's RNG.  Type "SPRNG" initializes the SPRNG generator.
类型的RNG。 "RNGstream"初始化的LEcuyers RNG。类型"SPRNG"初始化的SPRNG的发电机。


参数:streamper
Mode of the inititalization. Value "node" initializes one random number stream per node.<br> Value "replicate" initializes one stream per replicate.
模式的inititalization。值"node"每个节点初始化一个随机数流。<br>值"replicate"初始化每一个流复制。


参数:...
Arguments passed to the underlying function (see details bellow).
传递到底层函数的参数(详见波纹管)。


参数:seed
Integer value (SPRNG) or a vector of six integer values (RNGstream) used as seed for the RNG.
整数的值(SPRNG)或6的的整数值(RNGstream)作为种子的RNG的向量。


参数:n
Number of streams to be created. It should correspond to the number of replicates in the computation.
要创建的数据流的数目。它应该对应于在计算中的重复数目。


Details

详细信息----------Details----------

clusterSetupRNG.FT calls (subject to its argument values) one of the following functions, passing arguments (cl, ...): If the "SPRNG" type is used, then in case of streamper="node" the snow function clusterSetupSPRNG is called. In case of streamper="replicate", the function only checks the availability of the rsprng package on nodes but no initialization will be done at this point.  If the "RNGstream" type is used, then in case of streamper="node" the snow function clusterSetupRNGstream is called and in case of streamper="replicate" the function clusterSetupRNGstreamRepli is called. In the latter case, the argument n has to be given that corresponds to the total number of streams created for the computation. This mode is used by clusterApplyFT.  Note that using the function performParallel,  the user does not need to initialize the RNG separately, since it is accomplished within the function.
clusterSetupRNG.FT调用(它的参数值)以下的功能之一,通过参数(cl, ...):,如果“SPRNG”使用,然后在的情况下,streamper="node"雪功能X>被调用。 clusterSetupSPRNG,功能检查情况的streamper="replicate"包的节点上,但没有初始化将在这里完成。使用如果“RNGstream的”类型的,然后在箱子rsprng雪函数streamper="node"被称为clusterSetupRNGstream的功能streamper="replicate"被称为的箱子。在后者的情况下,参数clusterSetupRNGstreamRepli被给予对应于为计算创建的流的总数。此模式使用n。请注意,使用的功能clusterApplyFT,用户并不需要单独初始化的RNG内的函数来完成的,因为它是。

clusterSetupRNGstreamRepli loads the rlecuyer package and on each node it creates n streams. The streams are named by their ordinal number.
clusterSetupRNGstreamRepli加载rlecuyer包,并在每个节点上创建n流。流被命名为它们的顺序号码。


实例----------Examples----------


## Not run: [#不运行:]
cl <- makeClusterFT(3)
r<-10
clusterSetupRNG.FT(cl, streamper="replicate",n=r, seed=rep(1,6))
res<-clusterApplyFT(cl,rep(5,10),rnorm)
stopCluster(res[[2]])
print(res[[1]])
  
## End(Not run)[#(不执行)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-7 19:53 , Processed in 0.027715 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表