Robotics Library
0.7.0
|
k-d tree. More...
#include <KdtreeBoundingBoxNearestNeighbors.h>
Classes | |
struct | Branch |
struct | BranchCompare |
struct | Cut |
struct | IndexCompare |
struct | Interval |
struct | NeighborCompare |
struct | Node |
Public Types | |
typedef const MetricT::Value & | const_reference |
typedef ::std::ptrdiff_t | difference_type |
typedef MetricT::Value & | reference |
typedef ::std::size_t | size_type |
typedef MetricT::Value | value_type |
typedef MetricT::Distance | Distance |
typedef MetricT | Metric |
typedef MetricT::Size | Size |
typedef MetricT::Value | Value |
typedef ::std::pair< Distance, Value > | Neighbor |
Public Member Functions | |
KdtreeBoundingBoxNearestNeighbors (const Metric &metric) | |
KdtreeBoundingBoxNearestNeighbors (Metric &&metric=Metric()) | |
template<typename InputIterator > | |
KdtreeBoundingBoxNearestNeighbors (InputIterator first, InputIterator last, const Metric &metric) | |
template<typename InputIterator > | |
KdtreeBoundingBoxNearestNeighbors (InputIterator first, InputIterator last, Metric &&metric=Metric()) | |
~KdtreeBoundingBoxNearestNeighbors () | |
void | clear () |
::std::vector< Value > | data () const |
bool | empty () const |
::boost::optional< ::std::size_t > | getChecks () const |
::std::size_t | getNodeDataMax () const |
template<typename InputIterator > | |
void | insert (InputIterator first, InputIterator last) |
::std::vector< Neighbor > | nearest (const Value &query, const ::std::size_t &k, const bool &sorted=true) const |
void | push (const Value &value) |
::std::vector< Neighbor > | radius (const Value &query, const Distance &radius, const bool &sorted=true) const |
void | setChecks (const ::boost::optional< ::std::size_t > &checks) |
void | setNodeDataMax (const ::std::size_t &nodeDataMax) |
::std::size_t | size () const |
void | swap (KdtreeBoundingBoxNearestNeighbors &other) |
Private Types | |
typedef ::std::vector< Interval > | BoundingBox |
Private Member Functions | |
template<typename InputIterator > | |
void | computeBoundingBox (InputIterator first, InputIterator last, BoundingBox &boundingBox) |
void | data (const Node &node, ::std::vector< Value > &data) const |
template<typename InputIterator > | |
void | divide (Node &node, BoundingBox &boundingBox, InputIterator first, InputIterator last) |
void | push (Node &node, const Value &value) |
::std::vector< Neighbor > | search (const Value &query, const ::std::size_t *k, const Distance *radius, const bool &sorted) const |
void | search (const Node &node, const Value &query, const ::std::size_t *k, const Distance *radius, ::std::vector< Branch > &branches, ::std::vector< Neighbor > &neighbors, ::std::size_t &checks, const Distance &mindist, const ::std::vector< Distance > &sidedist) const |
template<typename InputIterator > | |
Cut | select (InputIterator first, InputIterator last, BoundingBox &boundingBox) |
Private Attributes | |
BoundingBox | boundingBox |
::boost::optional< ::std::size_t > | checks |
Metric | metric |
::std::size_t | nodeDataMax |
Node | root |
::std::size_t | values |
Friends | |
void | swap (KdtreeBoundingBoxNearestNeighbors &lhs, KdtreeBoundingBoxNearestNeighbors &rhs) |
k-d tree.
Jon Louis Bentley. Multidimensional binary search trees used for associative searching. Communications of the ACM, 18(9):509-517, September 1975.
|
private |
typedef const MetricT::Value& rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::const_reference |
typedef ::std::ptrdiff_t rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::difference_type |
typedef MetricT::Distance rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::Distance |
typedef MetricT rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::Metric |
typedef ::std::pair<Distance, Value> rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::Neighbor |
typedef MetricT::Value& rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::reference |
typedef MetricT::Size rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::Size |
typedef ::std::size_t rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::size_type |
typedef MetricT::Value rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::Value |
typedef MetricT::Value rl::math::KdtreeBoundingBoxNearestNeighbors< MetricT >::value_type |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |