is.connected | R Documentation |
Returns TRUE
iff the specified graphs are connected.
is.connected(g, connected = "strong", comp.dist.precomp = NULL)
g |
one or more input graphs. |
connected |
definition of connectedness to use; must be one of |
comp.dist.precomp |
a |
is.connected
determines whether the elements of g
are connected under the definition specified in connected
. (See component.dist
for details.) Since is.connected
is really just a wrapper for component.dist
, an object created with the latter can be supplied (via comp.dist.precomp
) to speed computation.
TRUE
iff g
is connected, otherwise FALSE
Carter T. Butts buttsc@uci.edu
West, D.B. (1996). Introduction to Graph Theory. Upper Saddle River, N.J.: Prentice Hall.
component.dist
, components
#Generate two graphs:
g1<-rgraph(10,tp=0.1)
g2<-rgraph(10)
#Check for connectedness
is.connected(g1) #Probably not
is.connected(g2) #Probably so
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.