grg.game               package:igraph               R Documentation

_G_e_o_m_e_t_r_i_c _r_a_n_d_o_m _g_r_a_p_h_s

_D_e_s_c_r_i_p_t_i_o_n:

     Generate a random graph based on the distance of random point on a
     unit square

_U_s_a_g_e:

     grg.game(nodes, radius, torus=FALSE, coords=FALSE)

_A_r_g_u_m_e_n_t_s:

   nodes: The number of vertices in the graph.

  radius: The radius within which the vertices will be connected by an
          edge.

   torus: Logical constant, whether to use a torus instead of a square.

  coords: Logical scalar, whether to add the positions of the vertices
          as vertex attributes called ''x'' and ''y''.

_D_e_t_a_i_l_s:

     First a number of points are dropped on a unit square, these
     points correspond to the vertices of the graph to create. Two
     points will be connected with an undirected edge if they are
     closer to each other in Euclidean norm than a given radius. If the
     'torus' argument is 'TRUE' then a unit area torus is used instead
     of a square.

_V_a_l_u_e:

     A graph object. If 'coords' is 'TRUE' then with vertex attributes
     ''x'' and ''y''.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu, first version was written by
     Keith Briggs keith.briggs@bt.com

_S_e_e _A_l_s_o:

     'random.graph.game'

_E_x_a_m_p_l_e_s:

     g <- grg.game(1000, 0.05, torus=FALSE)
     g2 <- grg.game(1000, 0.05, torus=TRUE)

