Skip to content

0.4.3

Latest
Compare
Choose a tag to compare
@arcondello arcondello released this 11 Dec 23:49
· 4 commits to main since this release
eae15af

New Features

  • Implement C++ operator<=>(const Update&, const Update&) and
    operator==(const Update&, const Update&). This allows Update to
    be used with std::ranges::stable_sort().
  • Add a new Cython extension type, _Graph. The _Graph class is
    responsible for managing a C++ dwave::optimization::Graph. Also
    make Model a Python class that inherits from _Graph, rather than
    a Cython extension type.
  • Add C++ DivideNode and Python Divide symbol, and overriding
    __truediv__. Divide propagates the division of its
    predecessors element-wise. Note that predecessors of Divide must be
    either strictly positive or strictly negative.
  • Add C++ SquareRootNode and Python SquareRoot symbol.
    SquareRoot propagates the square-root(s) of its predecessor
    element-wise.
  • Add const and non-const versions of C++ array iterators.
  • Make C++ array iterators random access iterators. Previously they
    were bidirectional iterators.

Upgrade Notes

  • Remove C++ Update::equals(const Update&) method in favour of
    operator==(const Update&, const Update&).
  • It is no longer possible to
    from dwave.optimization.model cimport Model. Instead, importers
    should from dwave.optimization.model cimport _Graph. A _Graph
    has most of the functionality that a Model did, although most of
    the symbol construction methods have been kept on Model.
  • The dwave::optimization::ArrayIterator class has been moved. It
    can now be found as a nested class in the Array, i.e.
    dwave::optimization::Array::const_iterator.