eos 1.4.0
|
#include <closest_edge_fitting.hpp>
Public Types | |
typedef KDTreeVectorOfVectorsAdaptor< VectorOfVectorsType, num_t, DIM, Distance > | self_t |
typedef Distance::template traits< num_t, self_t >::distance_t | metric_t |
typedef nanoflann::KDTreeSingleIndexAdaptor< metric_t, self_t, DIM, IndexType > | index_t |
Public Member Functions | |
KDTreeVectorOfVectorsAdaptor (const int dimensionality, const VectorOfVectorsType &mat, const int leaf_max_size=10) | |
The kd-tree index for the user to call its methods as usual with any other FLANN index. | |
void | query (const num_t *query_point, const size_t num_closest, IndexType *out_indices, num_t *out_distances_sq, const int nChecks_IGNORED=10) const |
Interface expected by KDTreeSingleIndexAdaptor | |
const self_t & | derived () const |
self_t & | derived () |
size_t | kdtree_get_point_count () const |
num_t | kdtree_distance (const num_t *p1, const size_t idx_p2, size_t size) const |
num_t | kdtree_get_pt (const size_t idx, int dim) const |
template<class BBOX > | |
bool | kdtree_get_bbox (BBOX &) const |
Public Attributes | |
index_t * | index |
const VectorOfVectorsType & | m_data |
A simple vector-of-vectors adaptor for nanoflann, without duplicating the storage. The i'th vector represents a point in the state space.
This adaptor is from the nanoflann examples and shows how to use it with these types of containers: typedef std::vector<std::vector<double> > my_vector_of_vectors_t; typedef std::vector<Eigen::VectorXd> my_vector_of_vectors_t;
It works with any type inside the vector that has operator[] defined to access its elements, as well as a ::size() operator to return its number of dimensions. Eigen::VectorX is one of them. cv::Point is not (no [] and no size()), glm is also not (no size()).
DIM | If set to >0, it specifies a compile-time fixed dimensionality for the points in the data set, allowing more compiler optimizations. |
num_t | The type of the point coordinates (typically, double or float). |
Distance | The distance metric to use: nanoflann::metric_L1, nanoflann::metric_L2, nanoflann::metric_L2_Simple, etc. |
IndexType | The type for indices in the KD-tree index (typically, size_t of int) |
|
inline |
The kd-tree index for the user to call its methods as usual with any other FLANN index.
Constructor: takes a const ref to the vector of vectors object with the data points
|
inline |
Query for the num_closest closest points to a given point (entered as query_point[0:dim-1]). Note that this is a short-cut method for index->findNeighbors(). The user can also call index->... methods as desired.