dimod.AdjDictBQM.set_linear

AdjDictBQM.set_linear(v, bias)[source]

Set the linear biase of the specified variable.

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