dimod.QuadraticModel.relabel_variables_as_integers#
- QuadraticModel.relabel_variables_as_integers(inplace: bool = True) Tuple[QuadraticModel, Mapping[Hashable, Hashable]] [source]#
Relabel the variables as [0, n) and return the mapping.
- Parameters:
inplace – If set to False, returns a new quadratic model mapped to the new labels.
- Returns:
The original or new quadratic model with updated variable labels.