#include <result_set.h>
Public Types | |
typedef DistanceIndex < DistanceType > | DistIndex |
Public Member Functions | |
void | addPoint (DistanceType dist, size_t index) |
void | clear () |
void | copy (size_t *indices, DistanceType *dists, size_t num_elements, bool sorted=true) |
bool | full () const |
KNNSimpleResultSet (size_t capacity_) | |
size_t | size () const |
DistanceType | worstDist () const |
~KNNSimpleResultSet () | |
Private Attributes | |
size_t | capacity_ |
size_t | count_ |
std::vector< DistIndex > | dist_index_ |
DistanceType | worst_distance_ |
KNNSimpleResultSet does not ensure that the element it holds are unique. Is used in those cases where the nearest neighbour algorithm used does not attempt to insert the same element multiple times.
Definition at line 101 of file result_set.h.
typedef DistanceIndex<DistanceType> rtflann::KNNSimpleResultSet< DistanceType >::DistIndex |
Definition at line 104 of file result_set.h.
rtflann::KNNSimpleResultSet< DistanceType >::KNNSimpleResultSet | ( | size_t | capacity_ | ) | [inline] |
Definition at line 106 of file result_set.h.
rtflann::KNNSimpleResultSet< DistanceType >::~KNNSimpleResultSet | ( | ) | [inline] |
Definition at line 114 of file result_set.h.
void rtflann::KNNSimpleResultSet< DistanceType >::addPoint | ( | DistanceType | dist, |
size_t | index | ||
) | [inline, virtual] |
Add a point to result set
dist | distance to point |
index | index of point |
Implements rtflann::ResultSet< DistanceType >.
Definition at line 151 of file result_set.h.
void rtflann::KNNSimpleResultSet< DistanceType >::clear | ( | ) | [inline] |
Clears the result set
Definition at line 121 of file result_set.h.
void rtflann::KNNSimpleResultSet< DistanceType >::copy | ( | size_t * | indices, |
DistanceType * | dists, | ||
size_t | num_elements, | ||
bool | sorted = true |
||
) | [inline] |
Copy indices and distances to output buffers
indices | |
dists | |
num_elements | Number of elements to copy |
sorted | Indicates if results should be sorted |
Definition at line 180 of file result_set.h.
bool rtflann::KNNSimpleResultSet< DistanceType >::full | ( | ) | const [inline, virtual] |
Radius search result set always reports full
Implements rtflann::ResultSet< DistanceType >.
Definition at line 141 of file result_set.h.
size_t rtflann::KNNSimpleResultSet< DistanceType >::size | ( | ) | const [inline] |
Definition at line 132 of file result_set.h.
DistanceType rtflann::KNNSimpleResultSet< DistanceType >::worstDist | ( | ) | const [inline, virtual] |
Implements rtflann::ResultSet< DistanceType >.
Definition at line 189 of file result_set.h.
size_t rtflann::KNNSimpleResultSet< DistanceType >::capacity_ [private] |
Definition at line 195 of file result_set.h.
size_t rtflann::KNNSimpleResultSet< DistanceType >::count_ [private] |
Definition at line 196 of file result_set.h.
std::vector<DistIndex> rtflann::KNNSimpleResultSet< DistanceType >::dist_index_ [private] |
Definition at line 198 of file result_set.h.
DistanceType rtflann::KNNSimpleResultSet< DistanceType >::worst_distance_ [private] |
Definition at line 197 of file result_set.h.