convertion: this function convert graph matrix form into graph edge form

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/loop.R

Description

graph matrix form is a square matrix in which each element a(ij) denotes the weight of a direction from a row entry (row i) to a column entry (column j)

Usage

1
convertion(gemat)

Arguments

gemat

the square graph matrix

Details

each element must be larger (a weighted link) or equal to zero (no link)

Value

graph edge matrix with first column meaning the starting points, the second column denoting the ending points, the last column denotes the weights for the links.

Author(s)

Youhua Chen <haydi@126.com>

References

Sun L, Wang M (2007) An algorithm for a decomposition of weighted digraphs: with applications to life cycle analysis in Ecology. Journal of Mathematical Biology, 54, 199-226.

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

See Also

decomp, gplot, loop.forward, loop.random

Examples

1
2
mat=matrix(c(13,26,0,11,18,15,15,0,2),nrow=3,ncol=3)
convertion(gemat=mat)

loop documentation built on May 2, 2019, 9:07 a.m.