ConnectedGraphQ¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
ConnectedGraphQ[g] gives True if g is connected.
Examples¶
No verified examples yet for this function.
Algorithm¶
connectivity.c - ConnectedGraphQ[g] and VertexConnectivity[g].
Both operate on the underlying undirected graph.
ConnectedGraphQ[g] True iff g has >= 1 vertex and forms a single
connected component.
VertexConnectivity[g] the least number of vertices whose removal
disconnects g (n-1 for a complete graph, 0 if already
disconnected or trivial). Computed by brute-force
search over vertex subsets -- exact, intended for the
small graphs of a pico-CAS.
Memory (SPEC section 4): returns freshly-allocated results; frees res.
Implementation notes¶
Attributes: Protected.
References¶
- Source:
src/graph/graph.c - Specification index:
Mathilda_spec.md - Tests:
tests/test_graph.c