erdos.renyi.game           package:igraph           R Documentation

_G_e_n_e_r_a_t_e _r_a_n_d_o_m _g_r_a_p_h_s _a_c_c_o_r_d_i_n_g _t_o _t_h_e _E_r_d_o_s-_R_e_n_y_i _m_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     This model is very simple, every possible edge is created with the
     same constant probability.

_U_s_a_g_e:

     erdos.renyi.game(n, p.or.m, type=c("gnp", "gnm"),
                      directed = FALSE, loops = FALSE, ...)

_A_r_g_u_m_e_n_t_s:

       n: The number of vertices in the graph.

  p.or.m: Either the probability for drawing an edge between two
          arbitrary vertices (G(n,p) graph), or the number of edges in
          the graph (for G(n,m) graphs).

    type: The type of the random graph to create, either 'gnp' (G(n,p)
          graph) or 'gnm' (G(n,m) graph).

directed: Logical, whether the graph will be directed, defaults to
          FALSE.

   loops: Logical, whether to add loop edges, defaults to FALSE.

     ...: Additional arguments, ignored.

_D_e_t_a_i_l_s:

     In G(n,p) graphs, the graph has 'n' vertices and for each edge the
     probability that it is present in the graph is 'p'.

     In G(n,m) graphs, the graph has 'n' vertices and 'm' edges, and
     the 'm' edges are chosen uniformly randomly from the set of all
     possible edges. This set includes loop edges as well if the
     'loops' parameter is TRUE.

     'random.graph.game' is an alias to this function.

_V_a_l_u_e:

     A graph object.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_R_e_f_e_r_e_n_c_e_s:

     Erdos, P. and Renyi, A., On random graphs, _Publicationes
     Mathematicae_ 6, 290-297 (1959).

_S_e_e _A_l_s_o:

     'barabasi.game'

_E_x_a_m_p_l_e_s:

     g <- erdos.renyi.game(1000, 1/1000)
     degree.distribution(g)

