dimod.binary.BinaryQuadraticModel.set_linear

BinaryQuadraticModel.set_linear(v: Hashable, bias: Union[float, numpy.floating, numpy.integer])[source]

Set the linear bias of of a variable.

Parameters

v – Variable in the binary quadratic model.

Raises

TypeError – If v is not hashable.