Mercurial > hg > audiodb
comparison audioDB.h @ 414:dc099cd34b5b
Small changes to add restrict list to indexed search. Removed redundant methods in indexed query code paths.
author | mas01mc |
---|---|
date | Tue, 23 Dec 2008 20:41:58 +0000 |
parents | 2d5c3f8e8c22 |
children | f283448a40db |
comparison
equal
deleted
inserted
replaced
396:bab245dc31d8 | 414:dc099cd34b5b |
---|---|
310 bool use_relative_threshold; | 310 bool use_relative_threshold; |
311 double relative_threshold; | 311 double relative_threshold; |
312 | 312 |
313 ReporterBase* reporter; // track/point reporter | 313 ReporterBase* reporter; // track/point reporter |
314 priority_queue<PointPair, std::vector<PointPair>, std::less<PointPair> >* exact_evaluation_queue; | 314 priority_queue<PointPair, std::vector<PointPair>, std::less<PointPair> >* exact_evaluation_queue; |
315 set<Uns32T> * allowed_keys; // search restrict list by key | |
315 | 316 |
316 // Timers | 317 // Timers |
317 struct timeval tv1; | 318 struct timeval tv1; |
318 struct timeval tv2; | 319 struct timeval tv2; |
319 | 320 |
417 int index_query_loop(const char* dbName, Uns32T queryIndex); | 418 int index_query_loop(const char* dbName, Uns32T queryIndex); |
418 vector<vector<float> >* index_initialize_shingles(Uns32T sz); | 419 vector<vector<float> >* index_initialize_shingles(Uns32T sz); |
419 int index_init_query(const char* dbName); | 420 int index_init_query(const char* dbName); |
420 int index_exists(const char* dbName, double radius, Uns32T sequenceLength); | 421 int index_exists(const char* dbName, double radius, Uns32T sequenceLength); |
421 char* index_get_name(const char*dbName, double radius, Uns32T sequenceLength); | 422 char* index_get_name(const char*dbName, double radius, Uns32T sequenceLength); |
422 static void index_add_point_approximate(void* instance, Uns32T pointID, Uns32T qpos, float dist); // static point reporter callback method | 423 static void index_add_point(void* instance, Uns32T pointID, Uns32T qpos, float dist); // static point reporter callback method |
423 static void index_add_point_exact(void* instance, Uns32T pointID, Uns32T qpos, float dist); // static point reporter callback method | |
424 static Uns32T index_to_trackID(Uns32T lshID, Uns32T nPntBits); // Convert lsh point index to audioDB trackID | 424 static Uns32T index_to_trackID(Uns32T lshID, Uns32T nPntBits); // Convert lsh point index to audioDB trackID |
425 static Uns32T index_to_trackPos(Uns32T lshID, Uns32T nPntBits); // Convert lsh point index to audioDB trackPos (spos) | 425 static Uns32T index_to_trackPos(Uns32T lshID, Uns32T nPntBits); // Convert lsh point index to audioDB trackPos (spos) |
426 static Uns32T index_from_trackInfo(Uns32T trackID, Uns32T pntID, Uns32T nPntBits); // Convert audioDB trackID and trackPos to an lsh point index | 426 static Uns32T index_from_trackInfo(Uns32T trackID, Uns32T pntID, Uns32T nPntBits); // Convert audioDB trackID and trackPos to an lsh point index |
427 void initialize_exact_evalutation_queue(); | 427 void initialize_exact_evalutation_queue(); |
428 void index_insert_exact_evaluation_queue(Uns32T trackID, Uns32T qpos, Uns32T spos); | 428 void index_insert_exact_evaluation_queue(Uns32T trackID, Uns32T qpos, Uns32T spos); |
429 LSH* index_allocate(char* indexName, bool load_hashTables); | 429 LSH* index_allocate(char* indexName, bool load_hashTables); |
430 void init_track_aux_data(Uns32T trackID, double* fvp, double** sNormpp,double** snPtrp, double** sPowerp, double** spPtrp); | 430 void init_track_aux_data(Uns32T trackID, double* fvp, double** sNormpp,double** snPtrp, double** sPowerp, double** spPtrp); |
431 void initialize_allowed_keys(std::ifstream*); // implementation of restrict lists using STL "set" class | |
432 int is_in_allowed_keys(Uns32T trackID); // test method for allowed_keys used during search | |
431 | 433 |
432 // Web Services | 434 // Web Services |
433 void startServer(); | 435 void startServer(); |
434 | 436 |
435 void ws_status(const char*dbName, char* hostport); | 437 void ws_status(const char*dbName, char* hostport); |
506 absolute_threshold(0.0), \ | 508 absolute_threshold(0.0), \ |
507 use_relative_threshold(false), \ | 509 use_relative_threshold(false), \ |
508 relative_threshold(0.0), \ | 510 relative_threshold(0.0), \ |
509 reporter(0), \ | 511 reporter(0), \ |
510 exact_evaluation_queue(0), \ | 512 exact_evaluation_queue(0), \ |
513 allowed_keys(0), \ | |
511 lisztOffset(0), \ | 514 lisztOffset(0), \ |
512 lisztLength(0), \ | 515 lisztLength(0), \ |
513 apierrortemp(0), \ | 516 apierrortemp(0), \ |
514 UseApiError(0), \ | 517 UseApiError(0), \ |
515 lsh(0), \ | 518 lsh(0), \ |