Robotics Library
0.7.0
|
Geometric Near-Neighbor Access Tree (GNAT). More...
#include <GnatNearestNeighbors.h>
Classes | |
struct | BranchCompare |
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::Value | Value |
typedef ::std::pair< Distance, Value > | Neighbor |
Public Member Functions | |
GnatNearestNeighbors (const Metric &metric) | |
GnatNearestNeighbors (Metric &&metric=Metric()) | |
template<typename InputIterator > | |
GnatNearestNeighbors (InputIterator first, InputIterator last, const Metric &metric) | |
template<typename InputIterator > | |
GnatNearestNeighbors (InputIterator first, InputIterator last, Metric &&metric=Metric()) | |
~GnatNearestNeighbors () | |
void | clear () |
::std::vector< Value > | data () const |
bool | empty () const |
::boost::optional< ::std::size_t > | getChecks () const |
::std::size_t | getNodeDataMax () const |
::std::size_t | getNodeDegree () const |
::std::size_t | getNodeDegreeMax () const |
::std::size_t | getNodeDegreeMin () 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 | seed (const ::std::mt19937::result_type &value) |
void | setChecks (const ::boost::optional< ::std::size_t > &checks) |
void | setNodeDataMax (const ::std::size_t &nodeDataMax) |
void | setNodeDegree (const ::std::size_t &nodeDegree) |
void | setNodeDegreeMax (const ::std::size_t &nodeDegreeMax) |
void | setNodeDegreeMin (const ::std::size_t &nodeDegreeMin) |
::std::size_t | size () const |
void | swap (GnatNearestNeighbors &other) |
Private Types | |
typedef ::std::pair< Distance, const Node * > | Branch |
Private Member Functions | |
void | choose (const Node &node, ::std::vector< ::std::size_t > ¢ers, ::std::vector< ::std::vector< Distance >> &distances) |
void | data (const Node &node, ::std::vector< Value > &data) const |
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 |
void | split (Node &node) |
Private Attributes | |
::boost::optional< ::std::size_t > | checks |
::std::mt19937 | generator |
Metric | metric |
::std::size_t | nodeDataMax |
::std::size_t | nodeDegree |
::std::size_t | nodeDegreeMax |
::std::size_t | nodeDegreeMin |
Node | root |
::std::size_t | values |
Friends | |
void | swap (GnatNearestNeighbors &lhs, GnatNearestNeighbors &rhs) |
Geometric Near-Neighbor Access Tree (GNAT).
Sergey Brin. Near neighbor search in large metric spaces. In Proceedings of the International Conference on Very Large Data Bases, pages 574-584, Zurich, Switzerland, September, 1985.
|
private |
typedef const MetricT::Value& rl::math::GnatNearestNeighbors< MetricT >::const_reference |
typedef ::std::ptrdiff_t rl::math::GnatNearestNeighbors< MetricT >::difference_type |
typedef MetricT::Distance rl::math::GnatNearestNeighbors< MetricT >::Distance |
typedef MetricT rl::math::GnatNearestNeighbors< MetricT >::Metric |
typedef ::std::pair<Distance, Value> rl::math::GnatNearestNeighbors< MetricT >::Neighbor |
typedef MetricT::Value& rl::math::GnatNearestNeighbors< MetricT >::reference |
typedef ::std::size_t rl::math::GnatNearestNeighbors< MetricT >::size_type |
typedef MetricT::Value rl::math::GnatNearestNeighbors< MetricT >::Value |
typedef MetricT::Value rl::math::GnatNearestNeighbors< MetricT >::value_type |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |