Mercurial > hg > audiodb
comparison audioDB.h @ 435:53c487885b2c api-inversion
begin pushing an adb_query_spec_t * all the way through query.
Almost all of the query specification data is in there now; missing are
the key list refinement and the query datum.
Mostly eliminate uses of the audioDB::sequenceLength member variable
throughout query.cpp. It's still used in functions in index.cpp,
though, so make sure that a correct value is installed before calling
audioDB::index_query_loop()
author | mas01cr |
---|---|
date | Wed, 24 Dec 2008 10:55:56 +0000 |
parents | 7af140bf8a0a |
children | 9a065b8db769 |
comparison
equal
deleted
inserted
replaced
434:7af140bf8a0a | 435:53c487885b2c |
---|---|
317 unsigned UseApiError; | 317 unsigned UseApiError; |
318 | 318 |
319 // private methods | 319 // private methods |
320 void error(const char* a, const char* b = "", const char *sysFunc = 0); | 320 void error(const char* a, const char* b = "", const char *sysFunc = 0); |
321 | 321 |
322 void initialize_arrays(adb_t *adb, int track, unsigned int numVectors, double *query, double *data_buffer, double **D, double **DD); | 322 void initialize_arrays(adb_t *adb, adb_query_spec_t *spec, int track, unsigned int numVectors, double *query, double *data_buffer, double **D, double **DD); |
323 void insertTimeStamps(unsigned n, std::ifstream* timesFile, double* timesdata); | 323 void insertTimeStamps(unsigned n, std::ifstream* timesFile, double* timesdata); |
324 void set_up_query(double **qp, double **vqp, double **qnp, double **vqnp, double **qpp, double **vqpp, double *mqdp, unsigned int *nvp); | 324 void set_up_query(adb_query_spec_t *spec, double **qp, double **vqp, double **qnp, double **vqnp, double **qpp, double **vqpp, double *mqdp, unsigned int *nvp); |
325 void set_up_query_from_key(double **qp, double **vqp, double **qnp, double **vqnp, double **qpp, double **vqpp, double *mqdp, unsigned *nvp, Uns32T queryIndex); | 325 void set_up_query_from_key(adb_query_spec_t *spec, double **qp, double **vqp, double **qnp, double **vqnp, double **qpp, double **vqpp, double *mqdp, unsigned *nvp, Uns32T queryIndex); |
326 int set_up_db(adb_t *adb, double **snp, double **vsnp, double **spp, double **vspp, double **mddp, unsigned int *dvp); | 326 int set_up_db(adb_t *adb, adb_query_spec_t *spec, double **snp, double **vsnp, double **spp, double **vspp, double **mddp, unsigned int *dvp); |
327 void query_loop(adb_query_parameters_t *params, adb_query_refine_t *refine, Uns32T queryIndex); | 327 void query_loop(adb_query_spec_t *spec, Uns32T queryIndex); |
328 void query_loop_points(double* query, double* qnPtr, double* qpPtr, double meanQdur, Uns32T numVectors, adb_query_parameters_t *params, adb_query_refine_t *refine); | 328 void query_loop_points(adb_query_spec_t *spec, double* query, double* qnPtr, double* qpPtr, double meanQdur, Uns32T numVectors); |
329 void initRNG(); | 329 void initRNG(); |
330 void initDBHeader(const char *dbName); | 330 void initDBHeader(const char *dbName); |
331 void initInputFile(const char *inFile, bool loadData = true); | 331 void initInputFile(const char *inFile, bool loadData = true); |
332 void initTables(const char* dbName, const char* inFile = 0); | 332 void initTables(const char* dbName, const char* inFile = 0); |
333 void initTablesFromKey(const char* dbName, const Uns32T queryIndex); | 333 void initTablesFromKey(const char* dbName, const Uns32T queryIndex); |
384 void index_insert_tracks(Uns32T start_track, Uns32T end_track, double** fvpp, double** sNormpp,double** snPtrp, double** sPowerp, double** spPtrp); | 384 void index_insert_tracks(Uns32T start_track, Uns32T end_track, double** fvpp, double** sNormpp,double** snPtrp, double** sPowerp, double** spPtrp); |
385 int index_insert_track(Uns32T trackID, double** fvpp, double** snpp, double** sppp); | 385 int index_insert_track(Uns32T trackID, double** fvpp, double** snpp, double** sppp); |
386 Uns32T index_insert_shingles(vector<vector<float> >*, Uns32T trackID, double* spp); | 386 Uns32T index_insert_shingles(vector<vector<float> >*, Uns32T trackID, double* spp); |
387 void index_make_shingle(vector<vector<float> >*, Uns32T idx, double* fvp, Uns32T dim, Uns32T seqLen); | 387 void index_make_shingle(vector<vector<float> >*, Uns32T idx, double* fvp, Uns32T dim, Uns32T seqLen); |
388 int index_norm_shingles(vector<vector<float> >*, double* snp, double* spp); | 388 int index_norm_shingles(vector<vector<float> >*, double* snp, double* spp); |
389 int index_query_loop(adb_query_parameters_t *params, adb_query_refine_t *refine, const char* dbName, Uns32T queryIndex); | 389 int index_query_loop(adb_query_spec_t *spec, const char* dbName, Uns32T queryIndex); |
390 vector<vector<float> >* index_initialize_shingles(Uns32T sz); | 390 vector<vector<float> >* index_initialize_shingles(Uns32T sz); |
391 int index_init_query(const char* dbName); | 391 int index_init_query(const char* dbName); |
392 int index_exists(const char* dbName, double radius, Uns32T sequenceLength); | 392 int index_exists(const char* dbName, double radius, Uns32T sequenceLength); |
393 char* index_get_name(const char*dbName, double radius, Uns32T sequenceLength); | 393 char* index_get_name(const char*dbName, double radius, Uns32T sequenceLength); |
394 static void index_add_point_approximate(void* instance, Uns32T pointID, Uns32T qpos, float dist); // static point reporter callback method | 394 static void index_add_point_approximate(void* instance, Uns32T pointID, Uns32T qpos, float dist); // static point reporter callback method |