![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Namespaces | |
| anyimpl | |
| cuda | |
| lsh | |
| mpi | |
| serialization | |
Typedefs | |
| typedef unsigned char | uchar |
| typedef std::map< std::string, any > | IndexParams |
Enumerations | |
| enum | tri_type { FLANN_False = 0 , FLANN_True = 1 , FLANN_Undefined } |
Functions | |
| template<template< typename > class Index, typename Distance , typename T > | |
| NNIndex< Distance > * | create_index_ (flann::Matrix< T > data, const flann::IndexParams ¶ms, const Distance &distance, typename enable_if< valid_combination< Index, Distance, T >::value, void >::type *=0) |
| template<template< typename > class Index, typename Distance , typename T > | |
| NNIndex< Distance > * | create_index_ (flann::Matrix< T > data, const flann::IndexParams ¶ms, const Distance &distance, typename disable_if< valid_combination< Index, Distance, T >::value, void >::type *=0) |
| template<typename Distance > | |
| NNIndex< Distance > * | create_index_by_type (const flann_algorithm_t index_type, const Matrix< typename Distance::ElementType > &dataset, const IndexParams ¶ms, const Distance &distance) |
| template<typename Distance > | |
| Distance::ResultType | ensureSquareDistance (typename Distance::ResultType dist) |
| std::ostream & | operator<< (std::ostream &stream, const cuda::kd_tree_builder_detail::SplitInfo &s) |
| void | log_verbosity (int level) |
| template<typename Distance > | |
| int | hierarchicalClustering (const Matrix< typename Distance::ElementType > &points, Matrix< typename Distance::ResultType > ¢ers, const KMeansIndexParams ¶ms, Distance d=Distance()) |
| size_t | flann_datatype_size (flann_datatype_t type) |
| template<typename T > | |
| void | save_to_file (const flann::Matrix< T > &dataset, const std::string &filename, const std::string &name) |
| template<typename T > | |
| void | load_from_file (flann::Matrix< T > &dataset, const std::string &filename, const std::string &name) |
| template<typename T > | |
| void | read_object (tcp::socket &sock, T &val) |
| template<typename T > | |
| void | write_object (tcp::socket &sock, const T &val) |
| template<typename Distance > | |
| void | find_nearest (const Matrix< typename Distance::ElementType > &dataset, typename Distance::ElementType *query, size_t *matches, size_t nn, size_t skip=0, Distance distance=Distance()) |
| template<typename Distance > | |
| void | compute_ground_truth (const Matrix< typename Distance::ElementType > &dataset, const Matrix< typename Distance::ElementType > &testset, Matrix< size_t > &matches, int skip=0, Distance d=Distance()) |
| int | countCorrectMatches (size_t *neighbors, size_t *groundTruth, int n) |
| template<typename Distance > | |
| Distance::ResultType | computeDistanceRaport (const Matrix< typename Distance::ElementType > &inputData, typename Distance::ElementType *target, size_t *neighbors, size_t *groundTruth, int veclen, int n, const Distance &distance) |
| template<typename Index , typename Distance > | |
| float | search_with_ground_truth (Index &index, const Matrix< typename Distance::ElementType > &inputData, const Matrix< typename Distance::ElementType > &testData, const Matrix< size_t > &matches, int nn, int checks, float &time, typename Distance::ResultType &dist, const Distance &distance, int skipMatches) |
| template<typename Index , typename Distance > | |
| float | test_index_checks (Index &index, const Matrix< typename Distance::ElementType > &inputData, const Matrix< typename Distance::ElementType > &testData, const Matrix< size_t > &matches, int checks, float &precision, const Distance &distance, int nn=1, int skipMatches=0) |
| template<typename Index , typename Distance > | |
| float | test_index_precision (Index &index, const Matrix< typename Distance::ElementType > &inputData, const Matrix< typename Distance::ElementType > &testData, const Matrix< size_t > &matches, float precision, int &checks, const Distance &distance, int nn=1, int skipMatches=0) |
| template<typename Index , typename Distance > | |
| void | test_index_precisions (Index &index, const Matrix< typename Distance::ElementType > &inputData, const Matrix< typename Distance::ElementType > &testData, const Matrix< int > &matches, float *precisions, int precisions_length, const Distance &distance, int nn=1, int skipMatches=0, float maxTime=0) |
| template<typename T > | |
| void | addValue (int pos, float val, float *vals, T *point, T *points, int n) |
| template<typename T , typename F > | |
| float | optimizeSimplexDownhill (T *points, int n, F func, float *vals=NULL) |
| template<typename T > | |
| T * | allocate (size_t count=1) |
| std::ostream & | operator<< (std::ostream &out, const any &any_val) |
| bool | has_param (const IndexParams ¶ms, std::string name) |
| template<typename T > | |
| T | get_param (const IndexParams ¶ms, std::string name, const T &default_value) |
| template<typename T > | |
| T | get_param (const IndexParams ¶ms, std::string name) |
| void | print_params (const IndexParams ¶ms) |
| void | print_params (const SearchParams ¶ms) |
| void | seed_random (unsigned int seed) |
| double | rand_double (double high=1.0, double low=0) |
| int | rand_int (int high=RAND_MAX, int low=0) |
| template<typename T > | |
| Matrix< T > | random_sample (Matrix< T > &srcMatrix, size_t size, bool remove=false) |
| template<typename Index > | |
| void | save_header (FILE *stream, const Index &index) |
| IndexHeader | load_header (FILE *stream) |
Variables | |
| const size_t | WORDSIZE =16 |
| const size_t | BLOCKSIZE =8192 |
| typedef std::map<std::string, any> flann::IndexParams |
| typedef unsigned char flann::uchar |
| enum flann::tri_type |
| void flann::addValue | ( | int | pos, |
| float | val, | ||
| float * | vals, | ||
| T * | point, | ||
| T * | points, | ||
| int | n | ||
| ) |
Adds val to array vals (and point to array points) and keeping the arrays sorted by vals.
Definition at line 41 of file simplex_downhill.h.
References points, and cloudViewer::utility::swap().
Referenced by optimizeSimplexDownhill().
| T* flann::allocate | ( | size_t | count = 1 | ) |
Allocates (using C's malloc) a generic type T.
Params: count = number of instances to allocate. Returns: pointer (of type T*) to memory buffer
Definition at line 49 of file allocator.h.
References count.
| void flann::compute_ground_truth | ( | const Matrix< typename Distance::ElementType > & | dataset, |
| const Matrix< typename Distance::ElementType > & | testset, | ||
| Matrix< size_t > & | matches, | ||
| int | skip = 0, |
||
| Distance | d = Distance() |
||
| ) |
Definition at line 87 of file ground_truth.h.
References flann::Matrix_::cols, and flann::Matrix_::rows.
| Distance::ResultType flann::computeDistanceRaport | ( | const Matrix< typename Distance::ElementType > & | inputData, |
| typename Distance::ElementType * | target, | ||
| size_t * | neighbors, | ||
| size_t * | groundTruth, | ||
| int | veclen, | ||
| int | n, | ||
| const Distance & | distance | ||
| ) |
Definition at line 64 of file index_testing.h.
|
inline |
Definition at line 48 of file index_testing.h.
References count.
Referenced by search_with_ground_truth().
|
inline |
Definition at line 136 of file all_indices.h.
References NULL.
|
inline |
Definition at line 129 of file all_indices.h.
References params.
|
inline |
#define this symbol before including flann.h to enable GPU search algorithms. But you have to link libflann_cuda then!
Definition at line 144 of file all_indices.h.
References FLANN_INDEX_AUTOTUNED, FLANN_INDEX_COMPOSITE, FLANN_INDEX_HIERARCHICAL, FLANN_INDEX_KDTREE, FLANN_INDEX_KDTREE_SINGLE, FLANN_INDEX_KMEANS, FLANN_INDEX_LINEAR, FLANN_INDEX_LSH, NULL, and params.
Referenced by flann::AutotunedIndex< Distance >::buildIndex().
| Distance::ResultType flann::ensureSquareDistance | ( | typename Distance::ResultType | dist | ) |
Definition at line 63 of file center_chooser.h.
References dist().
| void flann::find_nearest | ( | const Matrix< typename Distance::ElementType > & | dataset, |
| typename Distance::ElementType * | query, | ||
| size_t * | matches, | ||
| size_t | nn, | ||
| size_t | skip = 0, |
||
| Distance | distance = Distance() |
||
| ) |
Definition at line 42 of file ground_truth.h.
References flann::Matrix_::cols, flann::Matrix_::rows, and std::swap().
|
inline |
Definition at line 196 of file general.h.
References FLANN_FLOAT32, FLANN_FLOAT64, FLANN_INT16, FLANN_INT32, FLANN_INT64, FLANN_INT8, FLANN_UINT16, FLANN_UINT32, FLANN_UINT64, FLANN_UINT8, and type.
Referenced by flann::Matrix_::Matrix_().
| T flann::get_param | ( | const IndexParams & | params, |
| std::string | name | ||
| ) |
| T flann::get_param | ( | const IndexParams & | params, |
| std::string | name, | ||
| const T & | default_value | ||
| ) |
Definition at line 95 of file params.h.
Referenced by flann::AutotunedIndex< Distance >::AutotunedIndex(), flann::HierarchicalClusteringIndex< Distance >::HierarchicalClusteringIndex(), flann::KDTreeCuda3dIndex< Distance >::KDTreeCuda3dIndex(), flann::KDTreeIndex< Distance >::KDTreeIndex(), flann::KDTreeSingleIndex< Distance >::KDTreeSingleIndex(), flann::KMeansIndex< Distance >::KMeansIndex(), and flann::NNIndex< Distance >::serialize().
|
inline |
Definition at line 89 of file params.h.
Referenced by update_flann_parameters().
| int flann::hierarchicalClustering | ( | const Matrix< typename Distance::ElementType > & | points, |
| Matrix< typename Distance::ResultType > & | centers, | ||
| const KMeansIndexParams & | params, | ||
| Distance | d = Distance() |
||
| ) |
Performs a hierarchical clustering of the points passed as argument and then takes a cut in the the clustering tree to return a flat clustering.
| [in] | points | Points to be clustered |
| centers | The computed cluster centres. Matrix should be preallocated and centers.rows is the number of clusters requested. | |
| params | Clustering parameters (The same as for flann::KMeansIndex) | |
| d | Distance to be used for clustering (eg: flann::L2) |
Definition at line 424 of file flann.hpp.
References flann::KMeansIndex< Distance >::buildIndex(), flann::KMeansIndex< Distance >::getClusterCenters(), params, and points.
| void flann::load_from_file | ( | flann::Matrix< T > & | dataset, |
| const std::string & | filename, | ||
| const std::string & | name | ||
| ) |
Definition at line 130 of file hdf5.h.
References CHECK_ERROR, filename, name, and NULL.
Referenced by flann::mpi::Index< Distance >::Index(), and main().
|
inline |
| stream | - Stream to load from |
Definition at line 106 of file saving.h.
References FLANN_SIGNATURE_, flann::IndexHeader::h, and flann::IndexHeaderStruct::signature.
|
inline |
Sets the log level used for all flann functions
| level | Verbosity level |
Definition at line 54 of file flann.hpp.
References flann::Logger::setLevel().
Referenced by flann_log_verbosity().
|
inline |
| std::ostream& flann::operator<< | ( | std::ostream & | stream, |
| const cuda::kd_tree_builder_detail::SplitInfo & | s | ||
| ) |
| float flann::optimizeSimplexDownhill | ( | T * | points, |
| int | n, | ||
| F | func, | ||
| float * | vals = NULL |
||
| ) |
Simplex downhill optimization function. Preconditions: points is a 2D mattrix of size (n+1) x n func is the cost function taking n an array of n params and returning float vals is the cost function in the n+1 simplex points, if NULL it will be computed
Postcondition: returns optimum value and points[0..n] are the optimum parameters
Definition at line 69 of file simplex_downhill.h.
References addValue(), flann::Logger::info(), NULL, and points.
|
inline |
Definition at line 118 of file params.h.
References QtCompat::endl(), and params.
Referenced by flann::AutotunedIndex< Distance >::buildIndex().
|
inline |
Definition at line 127 of file params.h.
References QtCompat::endl(), and params.
|
inline |
Generates a random double value.
| high | Upper limit |
| low | Lower limit |
Definition at line 63 of file random.h.
Referenced by flann::KMeansppCenterChooser< Distance >::operator()().
|
inline |
Generates a random integer value.
| high | Upper limit |
| low | Lower limit |
Definition at line 74 of file random.h.
Referenced by flann::GonzalesCenterChooser< Distance >::operator()(), flann::KMeansppCenterChooser< Distance >::operator()(), flann::GroupWiseCenterChooser< Distance >::operator()(), flann::RandomGenerator::operator()(), and random_sample().
| Matrix<T> flann::random_sample | ( | Matrix< T > & | srcMatrix, |
| size_t | size, | ||
| bool | remove = false |
||
| ) |
Definition at line 40 of file sampling.h.
References flann::Matrix_::cols, copy, flann::UniqueRandom::next(), rand_int(), flann::Matrix_::rows, and size.
Referenced by CP::CutPursuit_KL< T >::init_labels(), CP::CutPursuit_L2< T >::init_labels(), and CP::CutPursuit_SPG< T >::init_labels().
| void flann::read_object | ( | tcp::socket & | sock, |
| T & | val | ||
| ) |
Definition at line 72 of file queries.h.
References size.
Referenced by flann::mpi::Client::knnSearch().
| void flann::save_header | ( | FILE * | stream, |
| const Index & | index | ||
| ) |
Saves index header to stream
| stream | - Stream to save to |
| index | - The index to save |
Definition at line 89 of file saving.h.
References flann::IndexHeaderStruct::cols, flann::IndexHeaderStruct::data_type, flann::Index< Distance >::getType(), flann::IndexHeader::h, flann::IndexHeaderStruct::index_type, flann::IndexHeaderStruct::rows, flann::Index< Distance >::size(), and flann::Index< Distance >::veclen().
| void flann::save_to_file | ( | const flann::Matrix< T > & | dataset, |
| const std::string & | filename, | ||
| const std::string & | name | ||
| ) |
Definition at line 78 of file hdf5.h.
References CHECK_ERROR, flann::Matrix_::cols, filename, name, NULL, flann::Matrix< T >::ptr(), and flann::Matrix_::rows.
| float flann::search_with_ground_truth | ( | Index & | index, |
| const Matrix< typename Distance::ElementType > & | inputData, | ||
| const Matrix< typename Distance::ElementType > & | testData, | ||
| const Matrix< size_t > & | matches, | ||
| int | nn, | ||
| int | checks, | ||
| float & | time, | ||
| typename Distance::ResultType & | dist, | ||
| const Distance & | distance, | ||
| int | skipMatches | ||
| ) |
Definition at line 86 of file index_testing.h.
References flann::Matrix_::cols, countCorrectMatches(), dist(), flann::Logger::info(), flann::Index< Distance >::knnSearch(), flann::Matrix_::rows, flann::StartStopTimer::start(), flann::StartStopTimer::stop(), and flann::StartStopTimer::value.
Referenced by test_index_checks(), test_index_precision(), and test_index_precisions().
|
inline |
Seeds the random number generator
| seed | Random seed |
Definition at line 49 of file random.h.
Referenced by init_flann_parameters().
| float flann::test_index_checks | ( | Index & | index, |
| const Matrix< typename Distance::ElementType > & | inputData, | ||
| const Matrix< typename Distance::ElementType > & | testData, | ||
| const Matrix< size_t > & | matches, | ||
| int | checks, | ||
| float & | precision, | ||
| const Distance & | distance, | ||
| int | nn = 1, |
||
| int | skipMatches = 0 |
||
| ) |
Definition at line 142 of file index_testing.h.
References dist(), flann::Logger::info(), and search_with_ground_truth().
| float flann::test_index_precision | ( | Index & | index, |
| const Matrix< typename Distance::ElementType > & | inputData, | ||
| const Matrix< typename Distance::ElementType > & | testData, | ||
| const Matrix< size_t > & | matches, | ||
| float | precision, | ||
| int & | checks, | ||
| const Distance & | distance, | ||
| int | nn = 1, |
||
| int | skipMatches = 0 |
||
| ) |
Definition at line 159 of file index_testing.h.
References dist(), fabs(), flann::Logger::info(), and search_with_ground_truth().
| void flann::test_index_precisions | ( | Index & | index, |
| const Matrix< typename Distance::ElementType > & | inputData, | ||
| const Matrix< typename Distance::ElementType > & | testData, | ||
| const Matrix< int > & | matches, | ||
| float * | precisions, | ||
| int | precisions_length, | ||
| const Distance & | distance, | ||
| int | nn = 1, |
||
| int | skipMatches = 0, |
||
| float | maxTime = 0 |
||
| ) |
Definition at line 232 of file index_testing.h.
References dist(), fabs(), flann::Logger::info(), and search_with_ground_truth().
| void flann::write_object | ( | tcp::socket & | sock, |
| const T & | val | ||
| ) |
Definition at line 86 of file queries.h.
References size.
Referenced by flann::mpi::Client::knnSearch().
| const size_t flann::BLOCKSIZE =8192 |
Definition at line 73 of file allocator.h.
Referenced by flann::PooledAllocator::allocateMemory().
| const size_t flann::WORDSIZE =16 |
Pooled storage allocator
The following routines allow for the efficient allocation of storage in small chunks from a specified pool. Rather than allowing each structure to be freed individually, an entire pool of storage is freed at once. This method has two advantages over just using malloc() and free(). First, it is far more efficient for allocating small objects, as there is no overhead for remembering all the information needed to free each object or consolidating fragmented memory. Second, the decision about how long to keep an object is made at the time of allocation, and there is no need to track down all the objects to free them.
Definition at line 72 of file allocator.h.
Referenced by flann::PooledAllocator::allocateMemory().