powered by
Tests if a graph represented by an adjacency matrix is connected.
is.connected(adj)
An adjacency matrix. Must be a numeric matrix with non-negative entries.
is.connected returns TRUE or FALSE depending on whether the graph represented in adj is a connected graph.
is.connected
TRUE
FALSE
adj
Idea by Ed Scheinerman, circa 2006. Source: http://www.ams.jhu.edu/~ers/matgraph/; routine: matgraph/@graph/isconnected.m
cluseigen, clust, browseVignettes("wsyn")
cluseigen
clust
browseVignettes("wsyn")
# NOT RUN { 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) # }
Run the code above in your browser using DataLab