dimod.bqm.adjarraybqm.AdjArrayBQM.degree

AdjArrayBQM.degree(self, v)

Return degree of the specified variable.

The degree is the number of variables sharing an interaction with v.

Parameters

v (hashable) – Variable in the binary quadratic model.

Returns

Degree of v.

Raises

ValueError – If v is not a variable in the binary quadratic model.