Description Usage Arguments Details Value Author(s) See Also Examples
Tests if a graph represented by an adjacency matrix is connected.
1 | is.connected(adj)
|
adj |
An adjacency matrix. Must be a numeric matrix with non-negative entries. |
Idea by Ed Scheinerman, circa 2006. Source: http://www.ams.jhu.edu/~ers/matgraph/; routine: matgraph/@graph/isconnected.m
is.connected
returns TRUE
or FALSE
depending on whether
the graph represented in adj
is a connected graph.
Lei Zhao, lei.zhao@cau.edu.cn
cluseigen
, clust
, browseVignettes("wsyn")
1 2 3 4 | g1<-matrix(c(0,0,0,1,1,0,0,0,0,1,0,0,0,0,1,0),4,4)
is.connected(g1)
g2<-matrix(c(0,1,0,0,1,0,0,0,0,0,0,1,0,0,1,0),4,4)
is.connected(g2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.