dimod.binary.BinaryQuadraticModel.degree#

BinaryQuadraticModel.degree(v: Hashable) int[source]#

Return the degree of a variable.

The degree is the number of interactions that contain v.

Parameters:

v – Variable in the binary quadratic model.