Primm's algorithm to search minimum spanning tree

Share:

Description

Each time search two nodes with lowest weights in an iterative manner

Usage

1
mst.primm(gemat)

Arguments

gemat

standard graph square matrix

Value

return a matrix in edge form, the first column is the starting node, the second column is the ending node

Author(s)

Youhua Chen <haydi@126.com>

References

Chen Y (2012) loop: an R package for performing decomposition of weighted directed graphs, food web analysis and flexible network plotting. Submitted.

Wang HY, Huang Q, Li CZ,Zhu BZ (2010) Graph algorithms and Matlab applications. BUAA Press, Beijing.

See Also

groupplot

Examples

1
2
mat=matrix(c(0,5,3,7,0,5,0,8,0,4,3,8,0,1,6,7,0,1,0,2,0,4,6,2,0),5,5)
mst.primm(mat)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.