minimum.spanning.tree         package:igraph         R Documentation

_M_i_n_i_m_u_m _s_p_a_n_n_i_n_g _t_r_e_e

_D_e_s_c_r_i_p_t_i_o_n:

     A subgraph of a connected graph is a _minimum spanning tree_ if it
     is tree, and the sum of its edge weights are the minimal among all
     tree subgraphs of the graph. A minimum spanning forest of a graph
     is the graph consisting of the minimum spanning trees of its
     components.

_U_s_a_g_e:

     minimum.spanning.tree(graph, weights=NULL, algorithm=NULL, ...)

_A_r_g_u_m_e_n_t_s:

   graph: The graph object to analyze.

 weights: Numeric algorithm giving the weights of the edges in the
          graph. The order is determined by the edge ids. This is
          ignored if the 'unweighted' algorithm is chosen 

algorithm: The algorithm to use for calculation. 'unweighted' can be
          used for unwieghted graphs, and 'prim' runs Prim's algorithm
          for weighted graphs. If this is 'NULL' then igraph tries to
          select the algorithm automatically: if the graph has an edge
          attribute called 'weight' of the 'weights' argument is not
          'NULL' then Prim's algorithm is chosen, otherwise the
          unwweighted algorithm is performed. 

     ...: Additional arguments, unused.

_D_e_t_a_i_l_s:

     If the graph is unconnected a minimum spanning forest is returned.

_V_a_l_u_e:

     A graph object with the minimum spanning forest. (To check that it
     is a tree check that the number of its edges is
     'vcount(graph)-1'.) The edge and vertex attributes of the original
     graph are preserved in the result.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_R_e_f_e_r_e_n_c_e_s:

     Prim, R.C. 1957. Shortest connection networks and some
     generalizations _Bell System Technical Journal_, 37 1389-1401.

_S_e_e _A_l_s_o:

     'clusters'

_E_x_a_m_p_l_e_s:

     g <- erdos.renyi.game(100, 3/100)
     mst <- minimum.spanning.tree(g)

