27 #ifndef MPBLOCKS_DUBINS_KD_TREE_KNEAREST_HPP_
28 #define MPBLOCKS_DUBINS_KD_TREE_KNEAREST_HPP_
36 template <
typename Scalar>
46 template <
typename Scalar>
49 while( m_queue.size() > 0 )
56 template <
typename Scalar>
66 template <
typename Scalar>
75 template <
typename Scalar>
81 using namespace curves_eigen;
85 key.
d2 = bestSoln.dist(m_radius);
91 if( m_queue.size() > m_k )
98 template <
typename Scalar>
103 using namespace curves_eigen;
105 Scalar d2 = bestSoln.dist(m_radius);
107 return ( m_queue.size() < m_k || d2 < m_queue.top().d2 );
122 #endif // NEARESTNEIGHBOR_H_
virtual bool shouldRecurse(const Point &q, const HyperRect_t &r)
evaluate the Euclidean distance from q to it's closest point in r and if that distance is less than t...
KNearest(unsigned int k=1, Scalar radius=1)
std::priority_queue< Key_t, KeyVec, KeyCompare > PQueue_t
Encodes a dubins path primitive, which is three connected arc segments.
virtual void evaluate(const Point &q, const Point &p, Node_t *n)
calculates Euclidean distance from q to p, and if its less than the current best replaces the current...
Eigen::Matrix< Scalar, 3, 1 > Point
Path< Format_t > solve(const Eigen::Matrix< Format_t, 3, 1 > &q0, const HyperRect< Format_t > &h, const Format_t r)