Go to the documentation of this file.
31 #ifndef RTABMAP_FLANN_HPP_
32 #define RTABMAP_FLANN_HPP_
75 template<
typename Distance>
177 void save(std::string filename)
179 FILE* fout = fopen(
filename.c_str(),
"wb");
282 std::vector< std::vector<size_t> >& indices,
283 std::vector<std::vector<DistanceType> >& dists,
285 const SearchParams& params)
const
300 std::vector< std::vector<int> >& indices,
301 std::vector<std::vector<DistanceType> >& dists,
303 const SearchParams& params)
const
321 const SearchParams& params)
const
339 const SearchParams& params)
const
354 std::vector< std::vector<size_t> >& indices,
355 std::vector<std::vector<DistanceType> >& dists,
357 const SearchParams& params)
const
372 std::vector< std::vector<int> >& indices,
373 std::vector<std::vector<DistanceType> >& dists,
375 const SearchParams& params)
const
383 FILE* fin = fopen(
filename.c_str(),
"rb");
389 throw FLANNException(
"Datatype of saved index is different than of the one to be loaded.");
433 template <
typename Distance>
int radiusSearch(const Matrix< ElementType > &queries, Matrix< size_t > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams ¶ms) const
Perform radius search.
void save(std::string filename)
IndexParams getParameters() const
virtual void addPoints(const Matrix< ElementType > &points, float rebuild_threshold=2)
Incrementally add points to the index.
Distance::ResultType DistanceType
virtual flann_algorithm_t getType() const =0
size_t sizeAtBuild() const
size_t removedCount() const
virtual int radiusSearch(const Matrix< ElementType > &queries, Matrix< size_t > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams ¶ms) const
Perform radius search.
virtual int knnSearch(const Matrix< ElementType > &queries, Matrix< size_t > &indices, Matrix< DistanceType > &dists, size_t knn, const SearchParams ¶ms) const
Perform k-nearest neighbor search.
IndexParams getParameters() const
ElementType * getPoint(size_t point_id)
int knnSearch(const Matrix< ElementType > &queries, Matrix< size_t > &indices, Matrix< DistanceType > &dists, size_t knn, const SearchParams ¶ms) const
Perform k-nearest neighbor search.
size_t removedCount() const
virtual void buildIndex()
int getClusterCenters(Matrix< DistanceType > ¢ers)
virtual int usedMemory() const =0
virtual ElementType * getPoint(size_t id)
void removePoint(size_t point_id)
IndexHeader load_header(FILE *stream)
void swap(GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &a, GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &b)
Index & operator=(Index other)
size_t sizeAtBuild() const
SmartProjectionParams params(gtsam::HESSIAN, gtsam::ZERO_ON_DEGENERACY)
Distance::ElementType ElementType
std_msgs::Header const * header(const M &m)
NNIndex< Distance > IndexType
IndexType * load_saved_index(const Matrix< ElementType > &dataset, const std::string &filename, Distance distance)
Index(const IndexParams ¶ms, Distance distance=Distance())
void addPoints(const Matrix< ElementType > &points, float rebuild_threshold=2)
virtual void removePoint(size_t id)
flann_algorithm_t getType() const
IndexParams index_params_
Double_ distance(const OrientedPlane3_ &p)
SavedIndexParams(std::string filename)
static void setLevel(int level)
std::map< std::string, any > IndexParams
virtual void buildIndex()
virtual void saveIndex(FILE *stream)=0
int hierarchicalClustering(const Matrix< typename Distance::ElementType > &points, Matrix< typename Distance::ResultType > ¢ers, const KMeansIndexParams ¶ms, Distance d=Distance())
virtual void loadIndex(FILE *stream)=0
void log_verbosity(int level)
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:10