network_is_connected
- compas.datastructures.network_is_connected(network)[source]
Verify that the network is connected.
- Parameters:
- network
compas.datastructures.Network
A network data structure.
- network
- Returns:
- bool
True, if the network is connected. False, otherwise.
Notes
A network is connected if for every two vertices a path exists connecting them.
Examples
>>> import compas >>> from compas.datastructures import Network >>> from compas.datastructures import network_is_connected >>> network = Network.from_obj(compas.get('lines.obj')) >>> network_is_connected(network) True