dimod.bqm.adjarraybqm.AdjArrayBQM.set_linear

AdjArrayBQM.set_linear(self, v, Bias b)

Set the linear bias of a variable.

Parameters
  • v (hashable) – A variable in the binary quadratic model.

  • b (numeric) – The linear bias to set for v.

Raises

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