v0.8.0
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:
- Interfacing with a space (point set).
- Interfacing with a point.
- 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
andPointTraits
plus the index type has been moved to the KdTree. - Renamed
StdPointTraits
toPointTraits
. - Removed the KdTree Dim template argument.
- KdTree Splitter argument changed from a template class to an enum value:
kLongestMedian
,kMidpoint
andkSlidingMidpoint
. kDynamicDim
renamed tokDynamicSize
to be more generic and its type changed fromint
topico_tree::Size
.- Metrics:
- Metrics now use iterators instead of points.
- Eigen metrics removed.
CvMatRow
replaced byPointMap
.- 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
andPointMap
classes to support interfacing with raw pointers. - Added the Midpoint splitting rule.
- Added the
SE2Squared
metric. - Added a default
SpaceTraits<>
overload forstd::reference_wrapper<SpaceType>
. This means that any supported space can be wrapped in anstd::reference_wrapper<SpaceType>
. - Added support to interface with fixed size arrays and
std::array<>
.