# dimod.traversal.connected_components¶

connected_components(bqm)[source]

Yields sets of connected variables.

Parameters

bqm (dimod.BinaryQuadraticModel) – A binary quadratic model (BQM).

Yields

set – A set of variables in the BQM that form a connected component.