Optimization updates
This commit is contained in:
+7
-2
@@ -6,6 +6,7 @@
|
||||
#include <climits>
|
||||
#include <set>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
@@ -43,12 +44,13 @@ public:
|
||||
void LoadMutationFeatures(string image_path, string image_name, int mutation);
|
||||
Image* GetMutated(Image* image, string image_name, int method);
|
||||
void Init();
|
||||
void CompareFeatures()
|
||||
void SaveToDisk();
|
||||
void LoadFromDisk();
|
||||
void rankImages(string image_name, int method);
|
||||
multiset<pair<uint64_t, string>> rankMutations(string image_name, int method);
|
||||
void runExperiments();
|
||||
void test();
|
||||
void test(int method);
|
||||
void generatePreviews(string imagename);
|
||||
void outputMap(int a);
|
||||
void outputMap();
|
||||
@@ -56,16 +58,19 @@ public:
|
||||
private:
|
||||
fs::path img_path;
|
||||
int numImages;
|
||||
|
||||
static const int numDescriptors = 8;
|
||||
static const int numMutations = 8;
|
||||
Descriptor* descriptor_types[numDescriptors];
|
||||
Mutation* mutators[numMutations];
|
||||
|
||||
//mutex mu; //for threading and suchlikes
|
||||
Image* current_image = NULL; //for caching purposes
|
||||
//TODO: Are maps the best container for us? Logarithmic random access is bad, but otherwise it might be fine?
|
||||
map<string, uint64_t> features[numDescriptors]; //array of maps that will hold the descriptors
|
||||
map<string, uint64_t> mutatedFeatures[numDescriptors][numMutations];
|
||||
vector<pair<string, uint64_t>> features_vector;
|
||||
vector<pair<string, uint64_t>> mutatedFeatures_vector[numMutations];
|
||||
vector<fs::Path> images;
|
||||
multiset<pair<uint64_t, string> > distances; //multiset that stores the distances
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user