|
| KDTreeSingleIndexDynamicAdaptor_ (const Dimension dimensionality, const DatasetAdaptor &inputData, std::vector< int > &treeIndex, const KDTreeSingleIndexAdaptorParams ¶ms=KDTreeSingleIndexAdaptorParams()) |
|
| KDTreeSingleIndexDynamicAdaptor_ (const KDTreeSingleIndexDynamicAdaptor_ &rhs)=default |
|
KDTreeSingleIndexDynamicAdaptor_ | operator= (const KDTreeSingleIndexDynamicAdaptor_ &rhs) |
|
void | buildIndex () |
|
void | computeBoundingBox (BoundingBox &bbox) |
|
template<class RESULTSET > |
void | searchLevel (RESULTSET &result_set, const ElementType *vec, const NodePtr node, DistanceType mindist, distance_vector_t &dists, const float epsError) const |
|
void | saveIndex (std::ostream &stream) |
|
void | loadIndex (std::istream &stream) |
|
|
template<typename RESULTSET > |
bool | findNeighbors (RESULTSET &result, const ElementType *vec, const SearchParameters &searchParams={}) const |
|
Size | knnSearch (const ElementType *query_point, const Size num_closest, IndexType *out_indices, DistanceType *out_distances, const SearchParameters &searchParams={}) const |
|
Size | radiusSearch (const ElementType *query_point, const DistanceType &radius, std::vector< ResultItem< IndexType, DistanceType > > &IndicesDists, const SearchParameters &searchParams={}) const |
|
template<class SEARCH_CALLBACK > |
Size | radiusSearchCustomCallback (const ElementType *query_point, SEARCH_CALLBACK &resultSet, const SearchParameters &searchParams={}) const |
|
void | freeIndex (Derived &obj) |
|
Size | size (const Derived &obj) const |
|
Size | veclen (const Derived &obj) |
|
ElementType | dataset_get (const Derived &obj, IndexType element, Dimension component) const |
| Helper accessor to the dataset points:
|
|
Size | usedMemory (Derived &obj) |
|
void | computeMinMax (const Derived &obj, Offset ind, Size count, Dimension element, ElementType &min_elem, ElementType &max_elem) |
|
NodePtr | divideTree (Derived &obj, const Offset left, const Offset right, BoundingBox &bbox) |
|
NodePtr | divideTreeConcurrent (Derived &obj, const Offset left, const Offset right, BoundingBox &bbox, std::atomic< unsigned int > &thread_count, std::mutex &mutex) |
|
void | middleSplit_ (const Derived &obj, const Offset ind, const Size count, Offset &index, Dimension &cutfeat, DistanceType &cutval, const BoundingBox &bbox) |
|
void | planeSplit (const Derived &obj, const Offset ind, const Size count, const Dimension cutfeat, const DistanceType &cutval, Offset &lim1, Offset &lim2) |
|
DistanceType | computeInitialDistances (const Derived &obj, const ElementType *vec, distance_vector_t &dists) const |
|
void | saveIndex (const Derived &obj, std::ostream &stream) const |
|
void | loadIndex (Derived &obj, std::istream &stream) |
|
kd-tree dynamic index
Contains the k-d trees and other information for indexing a set of points for nearest-neighbor matching.
The class "DatasetAdaptor" must provide the following interface (can be non-virtual, inlined methods):
size_t kdtree_get_point_count() const { ... }
T kdtree_get_pt(
const size_t idx,
const size_t dim)
const { ... }
{
bb[0].low = ...;
bb[0].high = ...;
bb[1].low = ...;
bb[1].high = ...;
...
return true;
}
T pi_const()
Definition nanoflann.hpp:87
- Template Parameters
-