dimod.traversal.connected_components

connected_components(bqm)[source]

Yields sets of connected variables.

Parameters:bqm (dimod.BinaryQuadraticModel) – A binary quadratic model.
Yields:set – A set of variables in the bqm that form a connected component.