Skip to content

v0.8.0

Compare
Choose a tag to compare
@Jaybro Jaybro released this 30 Jun 11:08
· 19 commits to master since this release
v0.8.0
62e457b

This release introduces an improved and simplified interface while at the same time cleaning up some of the internals. The main motivation for changing the interface was to reduce work related to creating traits while at the same time reducing and cleaning up their responsibilities. A traits class like StdTraits or EigenTraits was responsible for three things:

  1. Interfacing with a space (point set).
  2. Interfacing with a point.
  3. Specifying the index type stored in the KdTree.

A point interface was also available through StdPointTraits and often times a class like StdTraits simply used StdPointTraits, essentially showing that an implementer had to do duplicate work. It was also somewhat unclear if the interface should just support the point type stored by its respective space or if it should support other point types as well. This issue has been resolved by splitting up the "main" traits class into both SpaceTraits and PointTraits (the latter previously StdPointTraits). And well, if the interface gets broken anyway, we may as well change a bunch of other things 🥳

Interface changes:

  • The "main" traits classes have been split-up into SpaceTraits and PointTraits plus the index type has been moved to the KdTree.
  • Renamed StdPointTraits to PointTraits.
  • Removed the KdTree Dim template argument.
  • KdTree Splitter argument changed from a template class to an enum value: kLongestMedian, kMidpoint and kSlidingMidpoint.
  • kDynamicDim renamed to kDynamicSize to be more generic and its type changed from int to pico_tree::Size.
  • Metrics:
    • Metrics now use iterators instead of points.
    • Eigen metrics removed.
  • CvMatRow replaced by PointMap.
  • Updated Aknn functions to be overloads of the Knn functions for both the C++ and Python interface.
  • The KdTree now takes a Space as the first a template argument instead of a Traits. This makes setting the argument a bit more simple.
  • More consistent interface between points, spaces and their traits.
  • Google Code Guide update for output function arguments (from pointers to references).
  • Traits related header files renamed.
  • Minimum required C++ standard updated from C++11 to C++17.

Additional features:

  • Added the SpaceMap and PointMap classes to support interfacing with raw pointers.
  • Added the Midpoint splitting rule.
  • Added the SE2Squared metric.
  • Added a default SpaceTraits<> overload for std::reference_wrapper<SpaceType>. This means that any supported space can be wrapped in an std::reference_wrapper<SpaceType>.
  • Added support to interface with fixed size arrays and std::array<>.