The class used internally to define the GNAT. More...
#include <ompl/datastructures/NearestNeighborsGNATNoThreadSafety.h>
Public Member Functions | |
Node (int degree, int capacity, _T pivot) | |
Construct a node of given degree with at most capacity data elements and with given pivot. | |
void | updateRadius (double dist) |
Update minRadius_ and maxRadius_, given that an element was added with distance dist to the pivot. | |
void | updateRange (unsigned int i, double dist) |
Update minRange_[i] and maxRange_[i], given that an element was added to the i-th child of the parent that has distance dist to this Node's pivot. | |
void | add (GNAT &gnat, const _T &data) |
Add an element to the tree rooted at this node. | |
bool | needToSplit (const GNAT &gnat) const |
Return true iff the node needs to be split into child nodes. | |
void | split (GNAT &gnat) |
The split operation finds pivot elements for the child nodes and moves each data element of this node to the appropriate child node. | |
bool | insertNeighborK (NearQueue &nbh, std::size_t k, const _T &data, const _T &key, double dist) const |
Insert data in nbh if it is a near neighbor. Return true iff data was added to nbh. | |
void | nearestK (const GNAT &gnat, const _T &data, std::size_t k, bool &isPivot) const |
Compute the k nearest neighbors of data in the tree. For k=1, isPivot is true if the nearest neighbor is a pivot (which is important during removal; removing pivots is a special case). | |
void | insertNeighborR (NearQueue &nbh, double r, const _T &data, double dist) const |
Insert data in nbh if it is a near neighbor. | |
void | nearestR (const GNAT &gnat, const _T &data, double r) const |
Return all elements that are within distance r in nbh. | |
void | list (const GNAT &gnat, std::vector< _T > &data) const |
Public Attributes | |
unsigned int | degree_ |
Number of child nodes. | |
const _T | pivot_ |
Data element stored in this Node. | |
double | minRadius_ |
Minimum distance between the pivot element and the elements stored in data_. | |
double | maxRadius_ |
Maximum distance between the pivot element and the elements stored in data_. | |
std::vector< double > | minRange_ |
The i-th element in minRange_ is the minimum distance between the pivot and any data_ element in the i-th child node of this node's parent. | |
std::vector< double > | maxRange_ |
The i-th element in maxRange_ is the maximum distance between the pivot and any data_ element in the i-th child node of this node's parent. | |
std::vector< _T > | data_ |
The data elements stored in this node (in addition to the pivot element). An internal node has no elements stored in data_. | |
std::vector< Node * > | children_ |
The child nodes of this node. By definition, only internal nodes have child nodes. | |
double | distToPivot_ |
Scratch space to store distance to pivot during nearest neighbor queries. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Node &node) |
Detailed Description
class ompl::NearestNeighborsGNATNoThreadSafety< _T >::Node
The class used internally to define the GNAT.
Definition at line 374 of file NearestNeighborsGNATNoThreadSafety.h.
Constructor & Destructor Documentation
◆ Node()
|
inline |
Construct a node of given degree with at most capacity data elements and with given pivot.
Definition at line 379 of file NearestNeighborsGNATNoThreadSafety.h.
◆ ~Node()
|
inline |
Definition at line 395 of file NearestNeighborsGNATNoThreadSafety.h.
Member Function Documentation
◆ add()
|
inline |
Add an element to the tree rooted at this node.
Definition at line 431 of file NearestNeighborsGNATNoThreadSafety.h.
◆ insertNeighborK()
|
inline |
Insert data in nbh if it is a near neighbor. Return true iff data was added to nbh.
Definition at line 530 of file NearestNeighborsGNATNoThreadSafety.h.
◆ insertNeighborR()
|
inline |
Insert data in nbh if it is a near neighbor.
Definition at line 596 of file NearestNeighborsGNATNoThreadSafety.h.
◆ list()
|
inline |
Definition at line 669 of file NearestNeighborsGNATNoThreadSafety.h.
◆ nearestK()
|
inline |
Compute the k nearest neighbors of data in the tree. For k=1, isPivot is true if the nearest neighbor is a pivot (which is important during removal; removing pivots is a special case).
Definition at line 550 of file NearestNeighborsGNATNoThreadSafety.h.
◆ nearestR()
|
inline |
Return all elements that are within distance r in nbh.
Definition at line 602 of file NearestNeighborsGNATNoThreadSafety.h.
◆ needToSplit()
|
inline |
Return true iff the node needs to be split into child nodes.
Definition at line 471 of file NearestNeighborsGNATNoThreadSafety.h.
◆ split()
|
inline |
The split operation finds pivot elements for the child nodes and moves each data element of this node to the appropriate child node.
Definition at line 479 of file NearestNeighborsGNATNoThreadSafety.h.
◆ updateRadius()
|
inline |
Update minRadius_ and maxRadius_, given that an element was added with distance dist to the pivot.
Definition at line 403 of file NearestNeighborsGNATNoThreadSafety.h.
◆ updateRange()
|
inline |
Update minRange_[i] and maxRange_[i], given that an element was added to the i-th child of the parent that has distance dist to this Node's pivot.
Definition at line 423 of file NearestNeighborsGNATNoThreadSafety.h.
Friends And Related Symbol Documentation
◆ operator<<
|
friend |
Definition at line 680 of file NearestNeighborsGNATNoThreadSafety.h.
Member Data Documentation
◆ children_
std::vector<Node *> ompl::NearestNeighborsGNATNoThreadSafety< _T >::Node::children_ |
The child nodes of this node. By definition, only internal nodes have child nodes.
Definition at line 728 of file NearestNeighborsGNATNoThreadSafety.h.
◆ data_
std::vector<_T> ompl::NearestNeighborsGNATNoThreadSafety< _T >::Node::data_ |
The data elements stored in this node (in addition to the pivot element). An internal node has no elements stored in data_.
Definition at line 725 of file NearestNeighborsGNATNoThreadSafety.h.
◆ degree_
unsigned int ompl::NearestNeighborsGNATNoThreadSafety< _T >::Node::degree_ |
Number of child nodes.
Definition at line 710 of file NearestNeighborsGNATNoThreadSafety.h.
◆ distToPivot_
|
mutable |
Scratch space to store distance to pivot during nearest neighbor queries.
Definition at line 731 of file NearestNeighborsGNATNoThreadSafety.h.
◆ maxRadius_
double ompl::NearestNeighborsGNATNoThreadSafety< _T >::Node::maxRadius_ |
Maximum distance between the pivot element and the elements stored in data_.
Definition at line 716 of file NearestNeighborsGNATNoThreadSafety.h.
◆ maxRange_
std::vector<double> ompl::NearestNeighborsGNATNoThreadSafety< _T >::Node::maxRange_ |
The i-th element in maxRange_ is the maximum distance between the pivot and any data_ element in the i-th child node of this node's parent.
Definition at line 722 of file NearestNeighborsGNATNoThreadSafety.h.
◆ minRadius_
double ompl::NearestNeighborsGNATNoThreadSafety< _T >::Node::minRadius_ |
Minimum distance between the pivot element and the elements stored in data_.
Definition at line 714 of file NearestNeighborsGNATNoThreadSafety.h.
◆ minRange_
std::vector<double> ompl::NearestNeighborsGNATNoThreadSafety< _T >::Node::minRange_ |
The i-th element in minRange_ is the minimum distance between the pivot and any data_ element in the i-th child node of this node's parent.
Definition at line 719 of file NearestNeighborsGNATNoThreadSafety.h.
◆ pivot_
const _T ompl::NearestNeighborsGNATNoThreadSafety< _T >::Node::pivot_ |
Data element stored in this Node.
Definition at line 712 of file NearestNeighborsGNATNoThreadSafety.h.
The documentation for this class was generated from the following file:
- ompl/datastructures/NearestNeighborsGNATNoThreadSafety.h