![]() |
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 | |
| BruteForce ()=default | |
| BruteForce (const Matrix &data, const bool copy=false) | |
| void | setSorted (const bool sorted) |
| void | setTakeRoot (const bool takeRoot) |
| void | setThreads (const unsigned int threads) |
| void | setMaxDistance (const Scalar maxDist) |
| void | setData (const Matrix &data, const bool copy=false) |
| void | setDistance (const Distance &distance) |
| 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 |
Class for performing brute force knn search.
| typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> knncpp::BruteForce< Scalar, Distance >::Matrix |
| typedef knncpp::Matrixi knncpp::BruteForce< Scalar, Distance >::Matrixi |
| typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1> knncpp::BruteForce< Scalar, Distance >::Vector |
|
default |
|
inline |
Constructs a brute force instance with the given data.
| data | NxM matrix, M points of dimension N |
| copy | if true copies the data, otherwise assumes static data |
References copy, data, and knncpp::BruteForce< Scalar, Distance >::setData().
|
inline |
|
inline |
Returns the dimension of the data points in the search index.
Referenced by knncpp::BruteForce< Scalar, Distance >::query().
|
inline |
|
inline |
Set the data points used for this tree. This does not build the tree.
| data | NxM matrix, M points of dimension N |
| copy | if true data is copied, assumes static data otherwise |
Referenced by knncpp::BruteForce< Scalar, Distance >::BruteForce().
|
inline |
References Utils::distance().
|
inline |
Set the maximum distance for querying the tree. The search will be pruned if the maximum distance is set to any positive number.
| 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 if the distances after the query should be rooted or not. Taking the root of the distances increases query time, but the function will return true distances instead of their powered versions.
| takeRoot | set true if root should be taken else false |
|
inline |
Set the amount of threads that should be used for querying. 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.