36 #if EIGEN_VERSION_AT_LEAST(2,92,0) 40 #include "Eigen/Array" 44 #include <boost/any.hpp> 213 #define NABO_VERSION "1.0.4" 214 #define NABO_VERSION_INT 10004 226 Parameters(
const std::string& key,
const boost::any& value){(*this)[key] = value;}
233 T
get(
const std::string& key,
const T& defaultValue)
const 235 const_iterator it(find(key));
237 return boost::any_cast<T>(it->second);
248 typedef typename Eigen::Matrix<T, Eigen::Dynamic, 1>
Vector;
250 typedef typename Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
Matrix;
254 typedef typename Eigen::Matrix<Index, Eigen::Dynamic, 1>
IndexVector;
256 typedef typename Eigen::Matrix<Index, Eigen::Dynamic, Eigen::Dynamic>
IndexMatrix;
284 TOUCH_STATISTICS = 1,
290 ALLOW_SELF_MATCH = 1,
305 unsigned long knn(
const Vector& query, IndexVector& indices, Vector& dists2,
const Index k = 1,
const T epsilon = 0,
const unsigned optionFlags = 0,
const T maxRadius = std::numeric_limits<T>::infinity())
const;
318 virtual unsigned long knn(
const Matrix& query, IndexMatrix& indices, Matrix& dists2,
const Index k = 1,
const T epsilon = 0,
const unsigned optionFlags = 0,
const T maxRadius = std::numeric_limits<T>::infinity())
const = 0;
331 virtual unsigned long knn(
const Matrix& query, IndexMatrix& indices, Matrix& dists2,
const Vector& maxRadii,
const Index k = 1,
const T epsilon = 0,
const unsigned optionFlags = 0)
const = 0;
340 static NearestNeighbourSearch* create(
const Matrix& cloud,
const Index dim = std::numeric_limits<Index>::max(),
const SearchType preferedType = KDTREE_LINEAR_HEAP,
const unsigned creationOptionFlags = 0,
const Parameters& additionalParameters =
Parameters());
348 static NearestNeighbourSearch* createBruteForce(
const Matrix& cloud,
const Index dim = std::numeric_limits<Index>::max(),
const unsigned creationOptionFlags = 0);
357 static NearestNeighbourSearch* createKDTreeLinearHeap(
const Matrix& cloud,
const Index dim = std::numeric_limits<Index>::max(),
const unsigned creationOptionFlags = 0,
const Parameters& additionalParameters =
Parameters());
366 static NearestNeighbourSearch* createKDTreeTreeHeap(
const Matrix& cloud,
const Index dim = std::numeric_limits<Index>::max(),
const unsigned creationOptionFlags = 0,
const Parameters& additionalParameters =
Parameters());
382 void checkSizesKnn(
const Matrix& query,
const IndexMatrix& indices,
const Matrix& dists2,
const Index k,
const unsigned optionFlags,
const Vector* maxRadii = 0)
const;
Eigen::Matrix< Index, Eigen::Dynamic, 1 > IndexVector
a vector of indices to data points
Definition: nabo.h:254
Parameters()
Create an empty parameter vector.
Definition: nabo.h:221
const Index dim
the dimensionality of the data-point cloud
Definition: nabo.h:261
const Vector minBound
the low bound of the search space (axis-aligned bounding box)
Definition: nabo.h:265
brute-force using openCL, only available if OpenCL enabled, UNSTABLE API
Definition: nabo.h:277
Eigen::Matrix< Index, Eigen::Dynamic, Eigen::Dynamic > IndexMatrix
a matrix of indices to data points
Definition: nabo.h:256
Nearest neighbour search interface, templatized on scalar type.
Definition: nabo.h:245
SearchType
type of search
Definition: nabo.h:270
SearchOptionFlags
search option
Definition: nabo.h:288
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
a column-major Eigen matrix in which each column is a point; this matrix has dim rows ...
Definition: nabo.h:250
const unsigned creationOptionFlags
creation options
Definition: nabo.h:263
int Index
an index to a Vector or a Matrix, for refering to data points
Definition: nabo.h:252
const Vector maxBound
the high bound of the search space (axis-aligned bounding box)
Definition: nabo.h:267
NearestNeighbourSearch< double > NNSearchD
nearest neighbour search with scalars of type double
Definition: nabo.h:390
kd-tree with tree heap, good for large k (~from 30)
Definition: nabo.h:274
CreationOptionFlags
creation option
Definition: nabo.h:282
Parameter vector.
Definition: nabo.h:218
virtual ~NearestNeighbourSearch()
virtual destructor
Definition: nabo.h:369
Namespace for Nabo.
Definition: brute_force_cpu.cpp:40
kd-tree using openCL, pt in nodes, only available if OpenCL enabled, UNSTABLE API ...
Definition: nabo.h:275
kd-tree using openCL, pt in leaves, only available if OpenCL enabled, UNSTABLE API ...
Definition: nabo.h:276
kd-tree with linear heap, good for small k (~up to 30)
Definition: nabo.h:273
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
an Eigen vector of type T, to hold the coordinates of a point
Definition: nabo.h:248
Parameters(const std::string &key, const boost::any &value)
Create a parameter vector with a single entry.
Definition: nabo.h:226
const Matrix & cloud
the reference to the data-point cloud, which must remain valid during the lifetime of the NearestNeig...
Definition: nabo.h:259
NearestNeighbourSearch< float > NNSearchF
nearest neighbour search with scalars of type float
Definition: nabo.h:388