@not_implemented_for('undirected')
def is_strongly_connected(G):
 if (len(G) == 0):
  raise nx.NetworkXPointlessConcept('Connectivity is undefined for the null graph.')
 return (len(list(strongly_connected_components(G))[0]) == len(G))

@ not_implemented_for ( 'undirected' ) def is_strongly_connected ( G ) : if ( len ( G ) == 0 ) : raise nx . NetworkXPointlessConcept ( 'Connectivity is undefined for the null graph.' ) return ( len ( list ( strongly_connected_components ( G ) ) [ 0 ] ) == len ( G ) )
test directed graph for strong connectivity .