dimod.AdjVectorBQM.set_linear

AdjVectorBQM.set_linear(self, v, Bias b)

Set the linear biase of a variable v.

Parameters
  • v (hashable) – A variable in the binary quadratic model. It is added if not already in the model.

  • b (numeric) – The linear bias of v.

Raises

TypeError – If v is not hashable