diff --git a/include/boost/geometry/extensions/index/algorithms/maxdist.hpp b/include/boost/geometry/extensions/index/algorithms/maxdist.hpp index 1aa7a9b94..b207d271d 100644 --- a/include/boost/geometry/extensions/index/algorithms/maxdist.hpp +++ b/include/boost/geometry/extensions/index/algorithms/maxdist.hpp @@ -55,11 +55,11 @@ template typename geometry::default_distance_result::type maxdist(Point const& pt, Indexable const& i) { - return sum_for_indexable< + return detail::sum_for_indexable< Point, Indexable, typename index::traits::tag::type, - maxdist_tag, + detail::maxdist_tag, index::traits::dimension::value >::apply(pt, i); } diff --git a/include/boost/geometry/extensions/index/rtree/visitors/nearest.hpp b/include/boost/geometry/extensions/index/rtree/visitors/nearest.hpp index c9fb77d39..da950e7f4 100644 --- a/include/boost/geometry/extensions/index/rtree/visitors/nearest.hpp +++ b/include/boost/geometry/extensions/index/rtree/visitors/nearest.hpp @@ -12,6 +12,7 @@ #include #include +#include #include @@ -19,6 +20,10 @@ namespace boost { namespace geometry { namespace index { namespace detail { namespace rtree { namespace visitors { +// TODO: awulkiew - maby it's a good idea to check if curr_mindist < comp_mindist and then check predicates +// in store() or break store to 2 functions e.g. should_store() and store() +// - well not with this algorithm of storing k-th neighbor + template struct nearest_one { @@ -85,6 +90,7 @@ public: // TODO: awulkiew - test other methods: // heap, manual inserting // don't sort if size < k ? + // check the furthest distance at the first place, before push_back() } inline bool is_mindist_valid() const