![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <knncpp.h>
Public Types | |
| typedef Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > | Matrix |
| typedef Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > | Vector |
| typedef knncpp::Matrixi | Matrixi |
Public Member Functions | |
| MultiIndexHashing () | |
| MultiIndexHashing (const Matrix &data, const bool copy=false) | |
| void | setMaxDistance (const Scalar maxDist) |
| void | setSorted (const bool sorted) |
| void | setThreads (const unsigned int threads) |
| void | setSubstringLength (const Index len) |
| void | setData (const Matrix &data, const bool copy=false) |
| void | build () |
| template<typename Derived > | |
| void | query (const Eigen::MatrixBase< Derived > &queryPoints, const size_t knn, Matrixi &indices, Matrix &distances) const |
| Index | size () const |
| Index | dimension () const |
| void | clear () |
Class for performing KNN search in hamming space by multi-index hashing.
| typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> knncpp::MultiIndexHashing< Scalar >::Matrix |
| typedef knncpp::Matrixi knncpp::MultiIndexHashing< Scalar >::Matrixi |
| typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1> knncpp::MultiIndexHashing< Scalar >::Vector |
|
inline |
|
inline |
Constructs an index with the given data. This does not build the the index.
| data | NxM matrix, M points of dimension N |
| copy | if true copies the data, otherwise assumes static data |
References copy, data, and knncpp::MultiIndexHashing< Scalar >::setData().
|
inline |
|
inline |
Referenced by knncpp::MultiIndexHashing< Scalar >::setData().
|
inline |
Returns the dimension of the data points in the search index.
Referenced by knncpp::MultiIndexHashing< Scalar >::query().
|
inline |
|
inline |
Set the data points used for the KNN search.
| data | NxM matrix, M points of dimension N |
| copy | if true data is copied, assumes static data otherwise |
References knncpp::MultiIndexHashing< Scalar >::clear(), copy, and data.
Referenced by knncpp::MultiIndexHashing< Scalar >::MultiIndexHashing().
|
inline |
Set the maximum distance for querying the index. Note that if no maximum distance is used, this algorithm performs basically a brute force search.
| maxDist | maximum distance, <= 0 for no limit |
|
inline |
Set if the points returned by the queries should be sorted according to their distance to the query points.
| sorted | sort query results |
|
inline |
Set the length of substrings (in bytes) used for multi index hashing.
| len | lentth of bucket substrings in bytes |
|
inline |
Set the amount of threads that should be used for building and querying the tree. OpenMP has to be enabled for this to work.
| threads | amount of threads, 0 for optimal choice |
|
inline |
Returns the amount of data points stored in the search index.