IsWeaklyConn

IsWeaklyConn()

A graph method that tests whether a graph is weakly connected.

Parameters:

  • None

Return value:

  • bool

    Returns True if the graph is weakly connected, False otherwise.

The following example shows how to use IsWeaklyConn() for nodes in TNGraph, TUNGraph, and TNEANet:

import snap

Graph = snap.GenRndGnm(snap.TNGraph, 100, 1000)
print(Graph.IsWeaklyConn())

UGraph = snap.GenRndGnm(snap.TUNGraph, 100, 1000)
print(UGraph.IsWeaklyConn())

Network = snap.GenRndGnm(snap.TNEANet, 100, 1000)
print(Network.IsWeaklyConn())