diff --git a/modules/flann/include/opencv2/flann/any.h b/modules/flann/include/opencv2/flann/any.h index e829162bb6..5b57aa3df3 100644 --- a/modules/flann/include/opencv2/flann/any.h +++ b/modules/flann/include/opencv2/flann/any.h @@ -54,50 +54,50 @@ struct base_any_policy template struct typed_base_any_policy : base_any_policy { - virtual ::size_t get_size() { return sizeof(T); } - virtual const std::type_info& type() { return typeid(T); } + virtual ::size_t get_size() CV_OVERRIDE { return sizeof(T); } + virtual const std::type_info& type() CV_OVERRIDE { return typeid(T); } }; template -struct small_any_policy : typed_base_any_policy +struct small_any_policy CV_FINAL : typed_base_any_policy { - virtual void static_delete(void**) { } - virtual void copy_from_value(void const* src, void** dest) + virtual void static_delete(void**) CV_OVERRIDE { } + virtual void copy_from_value(void const* src, void** dest) CV_OVERRIDE { new (dest) T(* reinterpret_cast(src)); } - virtual void clone(void* const* src, void** dest) { *dest = *src; } - virtual void move(void* const* src, void** dest) { *dest = *src; } - virtual void* get_value(void** src) { return reinterpret_cast(src); } - virtual const void* get_value(void* const * src) { return reinterpret_cast(src); } - virtual void print(std::ostream& out, void* const* src) { out << *reinterpret_cast(src); } + virtual void clone(void* const* src, void** dest) CV_OVERRIDE { *dest = *src; } + virtual void move(void* const* src, void** dest) CV_OVERRIDE { *dest = *src; } + virtual void* get_value(void** src) CV_OVERRIDE { return reinterpret_cast(src); } + virtual const void* get_value(void* const * src) CV_OVERRIDE { return reinterpret_cast(src); } + virtual void print(std::ostream& out, void* const* src) CV_OVERRIDE { out << *reinterpret_cast(src); } }; template -struct big_any_policy : typed_base_any_policy +struct big_any_policy CV_FINAL : typed_base_any_policy { - virtual void static_delete(void** x) + virtual void static_delete(void** x) CV_OVERRIDE { if (* x) delete (* reinterpret_cast(x)); *x = NULL; } - virtual void copy_from_value(void const* src, void** dest) + virtual void copy_from_value(void const* src, void** dest) CV_OVERRIDE { *dest = new T(*reinterpret_cast(src)); } - virtual void clone(void* const* src, void** dest) + virtual void clone(void* const* src, void** dest) CV_OVERRIDE { *dest = new T(**reinterpret_cast(src)); } - virtual void move(void* const* src, void** dest) + virtual void move(void* const* src, void** dest) CV_OVERRIDE { (*reinterpret_cast(dest))->~T(); **reinterpret_cast(dest) = **reinterpret_cast(src); } - virtual void* get_value(void** src) { return *src; } - virtual const void* get_value(void* const * src) { return *src; } - virtual void print(std::ostream& out, void* const* src) { out << *reinterpret_cast(*src); } + virtual void* get_value(void** src) CV_OVERRIDE { return *src; } + virtual const void* get_value(void* const * src) CV_OVERRIDE { return *src; } + virtual void print(std::ostream& out, void* const* src) CV_OVERRIDE { out << *reinterpret_cast(*src); } }; template<> inline void big_any_policy::print(std::ostream& out, void* const* src) diff --git a/modules/flann/include/opencv2/flann/autotuned_index.h b/modules/flann/include/opencv2/flann/autotuned_index.h index e9abbf7214..2fbc6c9afb 100644 --- a/modules/flann/include/opencv2/flann/autotuned_index.h +++ b/modules/flann/include/opencv2/flann/autotuned_index.h @@ -100,7 +100,7 @@ public: /** * Method responsible with building the index. */ - virtual void buildIndex() + virtual void buildIndex() CV_OVERRIDE { std::ostringstream stream; bestParams_ = estimateBuildParams(); @@ -124,7 +124,7 @@ public: /** * Saves the index to a stream */ - virtual void saveIndex(FILE* stream) + virtual void saveIndex(FILE* stream) CV_OVERRIDE { save_value(stream, (int)bestIndex_->getType()); bestIndex_->saveIndex(stream); @@ -134,7 +134,7 @@ public: /** * Loads the index from a stream */ - virtual void loadIndex(FILE* stream) + virtual void loadIndex(FILE* stream) CV_OVERRIDE { int index_type; @@ -151,7 +151,7 @@ public: /** * Method that searches for nearest-neighbors */ - virtual void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) + virtual void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE { int checks = get_param(searchParams,"checks",FLANN_CHECKS_AUTOTUNED); if (checks == FLANN_CHECKS_AUTOTUNED) { @@ -163,7 +163,7 @@ public: } - IndexParams getParameters() const + IndexParams getParameters() const CV_OVERRIDE { return bestIndex_->getParameters(); } @@ -182,7 +182,7 @@ public: /** * Number of features in this index. */ - virtual size_t size() const + virtual size_t size() const CV_OVERRIDE { return bestIndex_->size(); } @@ -190,7 +190,7 @@ public: /** * The length of each vector in this index. */ - virtual size_t veclen() const + virtual size_t veclen() const CV_OVERRIDE { return bestIndex_->veclen(); } @@ -198,7 +198,7 @@ public: /** * The amount of memory (in bytes) this index uses. */ - virtual int usedMemory() const + virtual int usedMemory() const CV_OVERRIDE { return bestIndex_->usedMemory(); } @@ -206,7 +206,7 @@ public: /** * Algorithm name */ - virtual flann_algorithm_t getType() const + virtual flann_algorithm_t getType() const CV_OVERRIDE { return FLANN_INDEX_AUTOTUNED; } diff --git a/modules/flann/include/opencv2/flann/composite_index.h b/modules/flann/include/opencv2/flann/composite_index.h index 527ca1ad77..5e12a177bf 100644 --- a/modules/flann/include/opencv2/flann/composite_index.h +++ b/modules/flann/include/opencv2/flann/composite_index.h @@ -101,7 +101,7 @@ public: /** * @return The index type */ - flann_algorithm_t getType() const + flann_algorithm_t getType() const CV_OVERRIDE { return FLANN_INDEX_COMPOSITE; } @@ -109,7 +109,7 @@ public: /** * @return Size of the index */ - size_t size() const + size_t size() const CV_OVERRIDE { return kdtree_index_->size(); } @@ -117,7 +117,7 @@ public: /** * \returns The dimensionality of the features in this index. */ - size_t veclen() const + size_t veclen() const CV_OVERRIDE { return kdtree_index_->veclen(); } @@ -125,7 +125,7 @@ public: /** * \returns The amount of memory (in bytes) used by the index. */ - int usedMemory() const + int usedMemory() const CV_OVERRIDE { return kmeans_index_->usedMemory() + kdtree_index_->usedMemory(); } @@ -133,7 +133,7 @@ public: /** * \brief Builds the index */ - void buildIndex() + void buildIndex() CV_OVERRIDE { Logger::info("Building kmeans tree...\n"); kmeans_index_->buildIndex(); @@ -145,7 +145,7 @@ public: * \brief Saves the index to a stream * \param stream The stream to save the index to */ - void saveIndex(FILE* stream) + void saveIndex(FILE* stream) CV_OVERRIDE { kmeans_index_->saveIndex(stream); kdtree_index_->saveIndex(stream); @@ -155,7 +155,7 @@ public: * \brief Loads the index from a stream * \param stream The stream from which the index is loaded */ - void loadIndex(FILE* stream) + void loadIndex(FILE* stream) CV_OVERRIDE { kmeans_index_->loadIndex(stream); kdtree_index_->loadIndex(stream); @@ -164,7 +164,7 @@ public: /** * \returns The index parameters */ - IndexParams getParameters() const + IndexParams getParameters() const CV_OVERRIDE { return index_params_; } @@ -172,7 +172,7 @@ public: /** * \brief Method that searches for nearest-neighbours */ - void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) + void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE { kmeans_index_->findNeighbors(result, vec, searchParams); kdtree_index_->findNeighbors(result, vec, searchParams); diff --git a/modules/flann/include/opencv2/flann/flann_base.hpp b/modules/flann/include/opencv2/flann/flann_base.hpp index f3fd4fb20f..0ffb857cc6 100644 --- a/modules/flann/include/opencv2/flann/flann_base.hpp +++ b/modules/flann/include/opencv2/flann/flann_base.hpp @@ -128,7 +128,7 @@ public: /** * Builds the index. */ - void buildIndex() + void buildIndex() CV_OVERRIDE { if (!loaded_) { nnIndex_->buildIndex(); @@ -150,7 +150,7 @@ public: * \brief Saves the index to a stream * \param stream The stream to save the index to */ - virtual void saveIndex(FILE* stream) + virtual void saveIndex(FILE* stream) CV_OVERRIDE { nnIndex_->saveIndex(stream); } @@ -159,7 +159,7 @@ public: * \brief Loads the index from a stream * \param stream The stream from which the index is loaded */ - virtual void loadIndex(FILE* stream) + virtual void loadIndex(FILE* stream) CV_OVERRIDE { nnIndex_->loadIndex(stream); } @@ -167,7 +167,7 @@ public: /** * \returns number of features in this index. */ - size_t veclen() const + size_t veclen() const CV_OVERRIDE { return nnIndex_->veclen(); } @@ -175,7 +175,7 @@ public: /** * \returns The dimensionality of the features in this index. */ - size_t size() const + size_t size() const CV_OVERRIDE { return nnIndex_->size(); } @@ -183,7 +183,7 @@ public: /** * \returns The index type (kdtree, kmeans,...) */ - flann_algorithm_t getType() const + flann_algorithm_t getType() const CV_OVERRIDE { return nnIndex_->getType(); } @@ -191,7 +191,7 @@ public: /** * \returns The amount of memory (in bytes) used by the index. */ - virtual int usedMemory() const + virtual int usedMemory() const CV_OVERRIDE { return nnIndex_->usedMemory(); } @@ -200,7 +200,7 @@ public: /** * \returns The index parameters */ - IndexParams getParameters() const + IndexParams getParameters() const CV_OVERRIDE { return nnIndex_->getParameters(); } @@ -213,7 +213,7 @@ public: * \param[in] knn Number of nearest neighbors to return * \param[in] params Search parameters */ - void knnSearch(const Matrix& queries, Matrix& indices, Matrix& dists, int knn, const SearchParams& params) + void knnSearch(const Matrix& queries, Matrix& indices, Matrix& dists, int knn, const SearchParams& params) CV_OVERRIDE { nnIndex_->knnSearch(queries, indices, dists, knn, params); } @@ -227,7 +227,7 @@ public: * \param[in] params Search parameters * \returns Number of neighbors found */ - int radiusSearch(const Matrix& query, Matrix& indices, Matrix& dists, float radius, const SearchParams& params) + int radiusSearch(const Matrix& query, Matrix& indices, Matrix& dists, float radius, const SearchParams& params) CV_OVERRIDE { return nnIndex_->radiusSearch(query, indices, dists, radius, params); } @@ -235,7 +235,7 @@ public: /** * \brief Method that searches for nearest-neighbours */ - void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) + void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE { nnIndex_->findNeighbors(result, vec, searchParams); } diff --git a/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h b/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h index 9d890d4d68..2a947dab6b 100644 --- a/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h +++ b/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h @@ -435,7 +435,7 @@ public: /** * Returns size of index. */ - size_t size() const + size_t size() const CV_OVERRIDE { return size_; } @@ -443,7 +443,7 @@ public: /** * Returns the length of an index feature. */ - size_t veclen() const + size_t veclen() const CV_OVERRIDE { return veclen_; } @@ -453,7 +453,7 @@ public: * Computes the inde memory usage * Returns: memory used by the index */ - int usedMemory() const + int usedMemory() const CV_OVERRIDE { return pool.usedMemory+pool.wastedMemory+memoryCounter; } @@ -461,7 +461,7 @@ public: /** * Builds the index */ - void buildIndex() + void buildIndex() CV_OVERRIDE { if (branching_<2) { throw FLANNException("Branching factor must be at least 2"); @@ -480,13 +480,13 @@ public: } - flann_algorithm_t getType() const + flann_algorithm_t getType() const CV_OVERRIDE { return FLANN_INDEX_HIERARCHICAL; } - void saveIndex(FILE* stream) + void saveIndex(FILE* stream) CV_OVERRIDE { save_value(stream, branching_); save_value(stream, trees_); @@ -501,7 +501,7 @@ public: } - void loadIndex(FILE* stream) + void loadIndex(FILE* stream) CV_OVERRIDE { free_elements(); @@ -544,7 +544,7 @@ public: * vec = the vector for which to search the nearest neighbors * searchParams = parameters that influence the search algorithm (checks) */ - void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) + void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE { int maxChecks = get_param(searchParams,"checks",32); @@ -569,7 +569,7 @@ public: } - IndexParams getParameters() const + IndexParams getParameters() const CV_OVERRIDE { return params; } diff --git a/modules/flann/include/opencv2/flann/kdtree_index.h b/modules/flann/include/opencv2/flann/kdtree_index.h index 3f6ee01740..c233515b40 100644 --- a/modules/flann/include/opencv2/flann/kdtree_index.h +++ b/modules/flann/include/opencv2/flann/kdtree_index.h @@ -120,7 +120,7 @@ public: /** * Builds the index */ - void buildIndex() + void buildIndex() CV_OVERRIDE { /* Construct the randomized trees. */ for (int i = 0; i < trees_; i++) { @@ -136,13 +136,13 @@ public: } - flann_algorithm_t getType() const + flann_algorithm_t getType() const CV_OVERRIDE { return FLANN_INDEX_KDTREE; } - void saveIndex(FILE* stream) + void saveIndex(FILE* stream) CV_OVERRIDE { save_value(stream, trees_); for (int i=0; i& result, const ElementType* vec, const SearchParams& searchParams) + void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE { int maxChecks = get_param(searchParams,"checks", 32); float epsError = 1+get_param(searchParams,"eps",0.0f); @@ -214,7 +214,7 @@ public: } } - IndexParams getParameters() const + IndexParams getParameters() const CV_OVERRIDE { return index_params_; } diff --git a/modules/flann/include/opencv2/flann/kdtree_single_index.h b/modules/flann/include/opencv2/flann/kdtree_single_index.h index ef1539200a..22a28d0c1a 100644 --- a/modules/flann/include/opencv2/flann/kdtree_single_index.h +++ b/modules/flann/include/opencv2/flann/kdtree_single_index.h @@ -114,7 +114,7 @@ public: /** * Builds the index */ - void buildIndex() + void buildIndex() CV_OVERRIDE { computeBoundingBox(root_bbox_); root_node_ = divideTree(0, (int)size_, root_bbox_ ); // construct the tree @@ -133,13 +133,13 @@ public: } } - flann_algorithm_t getType() const + flann_algorithm_t getType() const CV_OVERRIDE { return FLANN_INDEX_KDTREE_SINGLE; } - void saveIndex(FILE* stream) + void saveIndex(FILE* stream) CV_OVERRIDE { save_value(stream, size_); save_value(stream, dim_); @@ -154,7 +154,7 @@ public: } - void loadIndex(FILE* stream) + void loadIndex(FILE* stream) CV_OVERRIDE { load_value(stream, size_); load_value(stream, dim_); @@ -179,7 +179,7 @@ public: /** * Returns size of index. */ - size_t size() const + size_t size() const CV_OVERRIDE { return size_; } @@ -187,7 +187,7 @@ public: /** * Returns the length of an index feature. */ - size_t veclen() const + size_t veclen() const CV_OVERRIDE { return dim_; } @@ -196,7 +196,7 @@ public: * Computes the inde memory usage * Returns: memory used by the index */ - int usedMemory() const + int usedMemory() const CV_OVERRIDE { return (int)(pool_.usedMemory+pool_.wastedMemory+dataset_.rows*sizeof(int)); // pool memory and vind array memory } @@ -210,7 +210,7 @@ public: * \param[in] knn Number of nearest neighbors to return * \param[in] params Search parameters */ - void knnSearch(const Matrix& queries, Matrix& indices, Matrix& dists, int knn, const SearchParams& params) + void knnSearch(const Matrix& queries, Matrix& indices, Matrix& dists, int knn, const SearchParams& params) CV_OVERRIDE { assert(queries.cols == veclen()); assert(indices.rows >= queries.rows); @@ -225,7 +225,7 @@ public: } } - IndexParams getParameters() const + IndexParams getParameters() const CV_OVERRIDE { return index_params_; } @@ -239,7 +239,7 @@ public: * vec = the vector for which to search the nearest neighbors * maxCheck = the maximum number of restarts (in a best-bin-first manner) */ - void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) + void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE { float epsError = 1+get_param(searchParams,"eps",0.0f); diff --git a/modules/flann/include/opencv2/flann/kmeans_index.h b/modules/flann/include/opencv2/flann/kmeans_index.h index 7da4e26240..2f48e40785 100644 --- a/modules/flann/include/opencv2/flann/kmeans_index.h +++ b/modules/flann/include/opencv2/flann/kmeans_index.h @@ -266,7 +266,7 @@ public: public: - flann_algorithm_t getType() const + flann_algorithm_t getType() const CV_OVERRIDE { return FLANN_INDEX_KMEANS; } @@ -291,7 +291,7 @@ public: { } - void operator()(const cv::Range& range) const + void operator()(const cv::Range& range) const CV_OVERRIDE { const int begin = range.start; const int end = range.end; @@ -398,7 +398,7 @@ public: /** * Returns size of index. */ - size_t size() const + size_t size() const CV_OVERRIDE { return size_; } @@ -406,7 +406,7 @@ public: /** * Returns the length of an index feature. */ - size_t veclen() const + size_t veclen() const CV_OVERRIDE { return veclen_; } @@ -421,7 +421,7 @@ public: * Computes the inde memory usage * Returns: memory used by the index */ - int usedMemory() const + int usedMemory() const CV_OVERRIDE { return pool_.usedMemory+pool_.wastedMemory+memoryCounter_; } @@ -429,7 +429,7 @@ public: /** * Builds the index */ - void buildIndex() + void buildIndex() CV_OVERRIDE { if (branching_<2) { throw FLANNException("Branching factor must be at least 2"); @@ -448,7 +448,7 @@ public: } - void saveIndex(FILE* stream) + void saveIndex(FILE* stream) CV_OVERRIDE { save_value(stream, branching_); save_value(stream, iterations_); @@ -460,7 +460,7 @@ public: } - void loadIndex(FILE* stream) + void loadIndex(FILE* stream) CV_OVERRIDE { load_value(stream, branching_); load_value(stream, iterations_); @@ -495,7 +495,7 @@ public: * vec = the vector for which to search the nearest neighbors * searchParams = parameters that influence the search algorithm (checks, cb_index) */ - void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) + void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE { int maxChecks = get_param(searchParams,"checks",32); @@ -554,7 +554,7 @@ public: return clusterCount; } - IndexParams getParameters() const + IndexParams getParameters() const CV_OVERRIDE { return index_params_; } diff --git a/modules/flann/include/opencv2/flann/linear_index.h b/modules/flann/include/opencv2/flann/linear_index.h index 5aa7a5cfac..ca3f44d0cb 100644 --- a/modules/flann/include/opencv2/flann/linear_index.h +++ b/modules/flann/include/opencv2/flann/linear_index.h @@ -63,47 +63,47 @@ public: LinearIndex(const LinearIndex&); LinearIndex& operator=(const LinearIndex&); - flann_algorithm_t getType() const + flann_algorithm_t getType() const CV_OVERRIDE { return FLANN_INDEX_LINEAR; } - size_t size() const + size_t size() const CV_OVERRIDE { return dataset_.rows; } - size_t veclen() const + size_t veclen() const CV_OVERRIDE { return dataset_.cols; } - int usedMemory() const + int usedMemory() const CV_OVERRIDE { return 0; } - void buildIndex() + void buildIndex() CV_OVERRIDE { /* nothing to do here for linear search */ } - void saveIndex(FILE*) + void saveIndex(FILE*) CV_OVERRIDE { /* nothing to do here for linear search */ } - void loadIndex(FILE*) + void loadIndex(FILE*) CV_OVERRIDE { /* nothing to do here for linear search */ index_params_["algorithm"] = getType(); } - void findNeighbors(ResultSet& resultSet, const ElementType* vec, const SearchParams& /*searchParams*/) + void findNeighbors(ResultSet& resultSet, const ElementType* vec, const SearchParams& /*searchParams*/) CV_OVERRIDE { ElementType* data = dataset_.data; for (size_t i = 0; i < dataset_.rows; ++i, data += dataset_.cols) { @@ -112,7 +112,7 @@ public: } } - IndexParams getParameters() const + IndexParams getParameters() const CV_OVERRIDE { return index_params_; } diff --git a/modules/flann/include/opencv2/flann/lsh_index.h b/modules/flann/include/opencv2/flann/lsh_index.h index 4d4670ea50..42afe892ac 100644 --- a/modules/flann/include/opencv2/flann/lsh_index.h +++ b/modules/flann/include/opencv2/flann/lsh_index.h @@ -107,7 +107,7 @@ public: /** * Builds the index */ - void buildIndex() + void buildIndex() CV_OVERRIDE { tables_.resize(table_number_); for (unsigned int i = 0; i < table_number_; ++i) { @@ -119,13 +119,13 @@ public: } } - flann_algorithm_t getType() const + flann_algorithm_t getType() const CV_OVERRIDE { return FLANN_INDEX_LSH; } - void saveIndex(FILE* stream) + void saveIndex(FILE* stream) CV_OVERRIDE { save_value(stream,table_number_); save_value(stream,key_size_); @@ -133,7 +133,7 @@ public: save_value(stream, dataset_); } - void loadIndex(FILE* stream) + void loadIndex(FILE* stream) CV_OVERRIDE { load_value(stream, table_number_); load_value(stream, key_size_); @@ -151,7 +151,7 @@ public: /** * Returns size of index. */ - size_t size() const + size_t size() const CV_OVERRIDE { return dataset_.rows; } @@ -159,7 +159,7 @@ public: /** * Returns the length of an index feature. */ - size_t veclen() const + size_t veclen() const CV_OVERRIDE { return feature_size_; } @@ -168,13 +168,13 @@ public: * Computes the index memory usage * Returns: memory used by the index */ - int usedMemory() const + int usedMemory() const CV_OVERRIDE { return (int)(dataset_.rows * sizeof(int)); } - IndexParams getParameters() const + IndexParams getParameters() const CV_OVERRIDE { return index_params_; } @@ -187,7 +187,7 @@ public: * \param[in] knn Number of nearest neighbors to return * \param[in] params Search parameters */ - virtual void knnSearch(const Matrix& queries, Matrix& indices, Matrix& dists, int knn, const SearchParams& params) + virtual void knnSearch(const Matrix& queries, Matrix& indices, Matrix& dists, int knn, const SearchParams& params) CV_OVERRIDE { assert(queries.cols == veclen()); assert(indices.rows >= queries.rows); @@ -217,7 +217,7 @@ public: * vec = the vector for which to search the nearest neighbors * maxCheck = the maximum number of restarts (in a best-bin-first manner) */ - void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& /*searchParams*/) + void findNeighbors(ResultSet& result, const ElementType* vec, const SearchParams& /*searchParams*/) CV_OVERRIDE { getNeighbors(vec, result); } diff --git a/modules/flann/include/opencv2/flann/result_set.h b/modules/flann/include/opencv2/flann/result_set.h index 7c09093978..5c69ac29e7 100644 --- a/modules/flann/include/opencv2/flann/result_set.h +++ b/modules/flann/include/opencv2/flann/result_set.h @@ -109,13 +109,13 @@ public: return count; } - bool full() const + bool full() const CV_OVERRIDE { return count == capacity; } - void addPoint(DistanceType dist, int index) + void addPoint(DistanceType dist, int index) CV_OVERRIDE { if (dist >= worst_distance_) return; int i; @@ -139,7 +139,7 @@ public: worst_distance_ = dists[capacity-1]; } - DistanceType worstDist() const + DistanceType worstDist() const CV_OVERRIDE { return worst_distance_; } @@ -176,13 +176,13 @@ public: return count; } - bool full() const + bool full() const CV_OVERRIDE { return count == capacity; } - void addPoint(DistanceType dist, int index) + void addPoint(DistanceType dist, int index) CV_OVERRIDE { if (dist >= worst_distance_) return; int i; @@ -215,7 +215,7 @@ public: worst_distance_ = dists[capacity-1]; } - DistanceType worstDist() const + DistanceType worstDist() const CV_OVERRIDE { return worst_distance_; } @@ -310,7 +310,7 @@ public: /** Check the status of the set * @return true if we have k NN */ - inline bool full() const + inline bool full() const CV_OVERRIDE { return is_full_; } @@ -365,7 +365,7 @@ public: * If we don't have enough neighbors, it returns the max possible value * @return */ - inline DistanceType worstDist() const + inline DistanceType worstDist() const CV_OVERRIDE { return worst_distance_; } @@ -402,7 +402,7 @@ public: * @param dist distance for that neighbor * @param index index of that neighbor */ - inline void addPoint(DistanceType dist, int index) + inline void addPoint(DistanceType dist, int index) CV_OVERRIDE { // Don't do anything if we are worse than the worst if (dist >= worst_distance_) return; @@ -422,7 +422,7 @@ public: /** Remove all elements in the set */ - void clear() + void clear() CV_OVERRIDE { dist_indices_.clear(); worst_distance_ = std::numeric_limits::max(); @@ -461,14 +461,14 @@ public: * @param dist distance for that neighbor * @param index index of that neighbor */ - void addPoint(DistanceType dist, int index) + void addPoint(DistanceType dist, int index) CV_OVERRIDE { if (dist <= radius_) dist_indices_.insert(DistIndex(dist, index)); } /** Remove all elements in the set */ - inline void clear() + inline void clear() CV_OVERRIDE { dist_indices_.clear(); } @@ -477,7 +477,7 @@ public: /** Check the status of the set * @return alwys false */ - inline bool full() const + inline bool full() const CV_OVERRIDE { return true; } @@ -486,7 +486,7 @@ public: * If we don't have enough neighbors, it returns the max possible value * @return */ - inline DistanceType worstDist() const + inline DistanceType worstDist() const CV_OVERRIDE { return radius_; }