Skip to content

@graphty/algorithms / index / isConnected

Function: isConnected() ​

isConnected(graph): boolean

Defined in: algorithms/components/connected.ts:96

Check if the graph is connected (has exactly one connected component)

Parameters ​

graph ​

Graph

The input graph (must be undirected)

Returns ​

boolean

True if the graph is connected, false otherwise