commit x64 compilation from lulu cause the other branch dont seems to compile properly at home
This commit is contained in:
@ -80,9 +80,11 @@ NNIndex<Distance>* load_saved_index(const Matrix<typename Distance::ElementType>
|
||||
}
|
||||
IndexHeader header = load_header(fin);
|
||||
if (header.data_type != Datatype<ElementType>::type()) {
|
||||
fclose(fin);
|
||||
throw FLANNException("Datatype of saved index is different than of the one to be created.");
|
||||
}
|
||||
if ((size_t(header.rows) != dataset.rows)||(size_t(header.cols) != dataset.cols)) {
|
||||
fclose(fin);
|
||||
throw FLANNException("The index saved belongs to a different dataset");
|
||||
}
|
||||
|
||||
@ -126,7 +128,7 @@ public:
|
||||
/**
|
||||
* Builds the index.
|
||||
*/
|
||||
void buildIndex()
|
||||
void buildIndex() CV_OVERRIDE
|
||||
{
|
||||
if (!loaded_) {
|
||||
nnIndex_->buildIndex();
|
||||
@ -148,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);
|
||||
}
|
||||
@ -157,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);
|
||||
}
|
||||
@ -165,7 +167,7 @@ public:
|
||||
/**
|
||||
* \returns number of features in this index.
|
||||
*/
|
||||
size_t veclen() const
|
||||
size_t veclen() const CV_OVERRIDE
|
||||
{
|
||||
return nnIndex_->veclen();
|
||||
}
|
||||
@ -173,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();
|
||||
}
|
||||
@ -181,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();
|
||||
}
|
||||
@ -189,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();
|
||||
}
|
||||
@ -198,7 +200,7 @@ public:
|
||||
/**
|
||||
* \returns The index parameters
|
||||
*/
|
||||
IndexParams getParameters() const
|
||||
IndexParams getParameters() const CV_OVERRIDE
|
||||
{
|
||||
return nnIndex_->getParameters();
|
||||
}
|
||||
@ -211,7 +213,7 @@ public:
|
||||
* \param[in] knn Number of nearest neighbors to return
|
||||
* \param[in] params Search parameters
|
||||
*/
|
||||
void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params)
|
||||
void knnSearch(const Matrix<ElementType>& queries, Matrix<int>& indices, Matrix<DistanceType>& dists, int knn, const SearchParams& params) CV_OVERRIDE
|
||||
{
|
||||
nnIndex_->knnSearch(queries, indices, dists, knn, params);
|
||||
}
|
||||
@ -225,7 +227,7 @@ public:
|
||||
* \param[in] params Search parameters
|
||||
* \returns Number of neighbors found
|
||||
*/
|
||||
int radiusSearch(const Matrix<ElementType>& query, Matrix<int>& indices, Matrix<DistanceType>& dists, float radius, const SearchParams& params)
|
||||
int radiusSearch(const Matrix<ElementType>& query, Matrix<int>& indices, Matrix<DistanceType>& dists, float radius, const SearchParams& params) CV_OVERRIDE
|
||||
{
|
||||
return nnIndex_->radiusSearch(query, indices, dists, radius, params);
|
||||
}
|
||||
@ -233,7 +235,7 @@ public:
|
||||
/**
|
||||
* \brief Method that searches for nearest-neighbours
|
||||
*/
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams)
|
||||
void findNeighbors(ResultSet<DistanceType>& result, const ElementType* vec, const SearchParams& searchParams) CV_OVERRIDE
|
||||
{
|
||||
nnIndex_->findNeighbors(result, vec, searchParams);
|
||||
}
|
||||
@ -241,7 +243,7 @@ public:
|
||||
/**
|
||||
* \brief Returns actual index
|
||||
*/
|
||||
FLANN_DEPRECATED NNIndex<Distance>* getIndex()
|
||||
CV_DEPRECATED NNIndex<Distance>* getIndex()
|
||||
{
|
||||
return nnIndex_;
|
||||
}
|
||||
@ -250,7 +252,7 @@ public:
|
||||
* \brief Returns index parameters.
|
||||
* \deprecated use getParameters() instead.
|
||||
*/
|
||||
FLANN_DEPRECATED const IndexParams* getIndexParameters()
|
||||
CV_DEPRECATED const IndexParams* getIndexParameters()
|
||||
{
|
||||
return &index_params_;
|
||||
}
|
||||
@ -262,6 +264,9 @@ private:
|
||||
bool loaded_;
|
||||
/** Parameters passed to the index */
|
||||
IndexParams index_params_;
|
||||
|
||||
Index(const Index &); // copy disabled
|
||||
Index& operator=(const Index &); // assign disabled
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user