snow-rand                package:snow                R Documentation

_U_n_i_f_o_r_m _R_a_n_d_o_m _N_u_m_b_e_r _G_e_n_e_r_a_t_i_o_n _i_n _S_N_O_W _C_l_u_s_t_e_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     Initialize independent uniform random number streams to be used in
     a SNOW cluster. It uses either the L'Ecuyer's random number
     generator (package rlecuyer required) or the SPRNG generator
     (package rsprng required).

_U_s_a_g_e:

     clusterSetupRNG (cl, type = "RNGstream", ...)

     clusterSetupRNGstream (cl, seed=rep(12345,6), ...)
     clusterSetupSPRNG (cl, seed = round(2^32 * runif(1)),
                        prngkind = "default", para = 0, ...) 

_A_r_g_u_m_e_n_t_s:

      cl: Cluster object.

    type: 'type="RNGstream"' (default) initializes the L'Ecuyer's RNG. 
          'type="SPRNG"' initializes the SPRNG generator.

     ...: 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.

prngkind: Character string naming generator type used with SPRNG.

    para: Additional parameters for the generator.

_D_e_t_a_i_l_s:

     'clusterSetupRNG' calls (subject to its argument values) one of
     the other functions, passing arguments '(cl, ...)'.  If the
     "SPRNG" type is used, then the function 'clusterSetupSPRNG' is
     called.  If the "RNGstream" type is used, then the function
     'clusterSetupRNGstream' is called.

     'clusterSetupSPRNG' loads the 'rsprng' package and initializes
     separate streams  on each node. For further details see the
     documentation of 'init.sprng'.  The generator on the master is not
     affected.

     'clusterSetupRNGstream' loads the 'rlecuyer' package, creates one
     stream per node and distributes the stream states to the nodes.

     For more details see <URL:
     http://www.stat.uiowa.edu/~luke/R/cluster/cluster.html>.

_E_x_a_m_p_l_e_s:

       ## Not run: 
     clusterSetupSPRNG(cl)
     clusterSetupSPRNG(cl, seed=1234)
     clusterSetupRNG(cl, seed=rep(1,6))
       
     ## End(Not run)

