fixed some more tests on Windows; changed inheritance Matx -> Vec to Vec -> Matx

This commit is contained in:
Vadim Pisarevsky
2010-11-06 21:51:21 +00:00
parent 5a53d82e30
commit d8ace43753
13 changed files with 655 additions and 648 deletions

View File

@@ -156,7 +156,7 @@ public:
{
int index_type;
load_value(stream,index_type);
IndexParams* params = ParamsFactory::instance().create((flann_algorithm_t)index_type);
IndexParams* params = ParamsFactory_instance().create((flann_algorithm_t)index_type);
bestIndex = create_index_by_type(dataset, *params);
bestIndex->loadIndex(stream);
load_value(stream, bestSearchParams);

View File

@@ -123,7 +123,7 @@ NNIndex<T>* load_saved_index(const Matrix<T>& dataset, const string& filename)
throw FLANNException("The index saved belongs to a different dataset");
}
IndexParams* params = ParamsFactory::instance().create(header.index_type);
IndexParams* params = ParamsFactory_instance().create(header.index_type);
NNIndex<T>* nnIndex = create_index_by_type(dataset, *params);
nnIndex->loadIndex(fin);
fclose(fin);

View File

@@ -134,7 +134,7 @@ public:
typedef ObjectFactory<IndexParams, flann_algorithm_t> ParamsFactory;
CV_EXPORTS ParamsFactory& ParamsFactory_instance();
struct CV_EXPORTS SearchParams {
SearchParams(int checks_ = 32) :

View File

@@ -50,7 +50,7 @@ class ObjectFactory
std::map<UniqueIdType, CreateObjectFunc> object_registry;
// singleton class, private constructor
ObjectFactory() {};
//ObjectFactory() {};
public:
typedef typename std::map<UniqueIdType, CreateObjectFunc>::iterator Iterator;
@@ -81,11 +81,11 @@ public:
return ((*iter).second)();
}
static ObjectFactory<BaseClass,UniqueIdType>& instance()
/*static ObjectFactory<BaseClass,UniqueIdType>& instance()
{
static ObjectFactory<BaseClass,UniqueIdType> the_factory;
return the_factory;
}
}*/
};