igraph.sample             package:igraph             R Documentation

_S_a_m_p_l_i_n_g _a _r_a_n_d_o_m _i_n_t_e_g_e_r _s_e_q_u_e_n_c_e

_D_e_s_c_r_i_p_t_i_o_n:

     This function provides a very efficient way to pull an integer
     random sample sequence from an integer interval.

_U_s_a_g_e:

     igraph.sample(low, high, length)

_A_r_g_u_m_e_n_t_s:

     low: The lower limit of the interval (inclusive).

    high: The higher limit of the interval (inclusive).

  length: The length of the sample.

_D_e_t_a_i_l_s:

     The algorithm runs in 'O(length)' expected time, even if
     'high-low' is big. It is much faster (but of course less general)
     than the builtin 'sample' function of R.

_V_a_l_u_e:

     An increasing numeric vector containing integers, the sample.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_R_e_f_e_r_e_n_c_e_s:

     Jeffrey Scott Vitter: An Efficient Algorithm for Sequential Random
     Sampling, _ACM Transactions on Mathematical Software_, 13/1,
     58-67.

_E_x_a_m_p_l_e_s:

     rs <- igraph.sample(1, 100000000, 10)
     rs

