Template Class KdTreeIndex

Nested Relationships

Nested Types

Class Documentation

template<int DIMS, typename Adapter, typename DistanceType = L2>
class KdTreeIndex

Public Functions

template<typename Container>
inline void build(const Container &container)

Builds the index using the data passes in your container and the adapter

inline void clear()
inline void toStream(std::ostream &str) const
inline void fromStream(std::istream &str)
template<typename Type, typename Container>
inline std::vector<std::pair<uint32_t, double>> searchKnn(const Container &container, const Type &val, int nn, bool sorted = true)
template<typename Type, typename Container>
inline std::vector<std::pair<uint32_t, double>> radiusSearch(const Container &container, const Type &val, double dist, bool sorted = true, int maxNN = -1) const
template<typename Type, typename Container>
inline void radiusSearch(std::vector<std::pair<uint32_t, double>> &res, const Container &container, const Type &val, double dist, bool sorted = true, int maxNN = -1)