0.10.0.dev8
Pre-release
Pre-release
Release Notes
0.10.0.dev8
New Features
- Add bin_packing, knapsack and multi_knapsack constrained quadratic model generators.
- Add
BinaryQuadraticModel.is_almost_equal
method for testing approximate equality to other binary quadratic models.
- Add
Variables.copy
method, implemented as acpdef
method for Cython and Python access.
-
Support specifying lower and upper bounds for integer variables in quadratic models:
- Add
lower_bound
andupper_bound
keyword arguments toQuadraticModel.add_variable
. - Add
QuadraticModel.lower_bound
andQuadraticModel.upper_bound
methods.
- Add
Upgrade Notes
- Remove
dimod.utils.LockableDict
anddimod.decorators.lockable_method
. AlsoSampleSet.is_writeable
can no longer be set toFalse
.
Deprecation Notes
AdjVectorBQM
andAdjDictBQM
are deprecated and will be removed in dimod 0.11.0. UseBinaryQuadraticModel
withdtype=np.float64
anddtype=object
respectively.
SampleSet.is_writeable
is deprecated and now always returns True.
Bug Fixes
- Add support for AdjVectorBQM and AdjDictBQM in ConstrainedQuadraticModel.
- Fix shallow copies of
Variables
objects when usingcopy.copy
.
- Implement rule of five for
dimod::NeighborhoodIterator
,dimod::ConstNeighborhoodIterator
, anddimod::ConstQuadraticIterator
. This fixes double frees caused by the default copy constructor copying information that is not intended to be shared.
- Fix shallow copies of
BinaryQuadraticModel
withobject
dtype when usingcopy.copy
.