diff 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
line wrap: on
line diff
--- a/audioDB.h	Wed Dec 24 10:55:52 2008 +0000
+++ b/audioDB.h	Wed Dec 24 10:55:56 2008 +0000
@@ -319,13 +319,13 @@
   // private methods
   void error(const char* a, const char* b = "", const char *sysFunc = 0);
 
-  void initialize_arrays(adb_t *adb, int track, unsigned int numVectors, double *query, double *data_buffer, double **D, double **DD);
+  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);
   void insertTimeStamps(unsigned n, std::ifstream* timesFile, double* timesdata);
-  void set_up_query(double **qp, double **vqp, double **qnp, double **vqnp, double **qpp, double **vqpp, double *mqdp, unsigned int *nvp);
-  void set_up_query_from_key(double **qp, double **vqp, double **qnp, double **vqnp, double **qpp, double **vqpp, double *mqdp, unsigned *nvp, Uns32T queryIndex);
-  int set_up_db(adb_t *adb, double **snp, double **vsnp, double **spp, double **vspp, double **mddp, unsigned int *dvp);
-  void query_loop(adb_query_parameters_t *params, adb_query_refine_t *refine, Uns32T queryIndex);
-  void query_loop_points(double* query, double* qnPtr, double* qpPtr, double meanQdur, Uns32T numVectors, adb_query_parameters_t *params, adb_query_refine_t *refine);
+  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);
+  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);
+  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);
+  void query_loop(adb_query_spec_t *spec, Uns32T queryIndex);
+  void query_loop_points(adb_query_spec_t *spec, double* query, double* qnPtr, double* qpPtr, double meanQdur, Uns32T numVectors);
   void initRNG();
   void initDBHeader(const char *dbName);
   void initInputFile(const char *inFile, bool loadData = true);
@@ -386,7 +386,7 @@
   Uns32T index_insert_shingles(vector<vector<float> >*, Uns32T trackID, double* spp);
   void index_make_shingle(vector<vector<float> >*, Uns32T idx, double* fvp, Uns32T dim, Uns32T seqLen);
   int index_norm_shingles(vector<vector<float> >*, double* snp, double* spp);
-  int index_query_loop(adb_query_parameters_t *params, adb_query_refine_t *refine, const char* dbName, Uns32T queryIndex);
+  int index_query_loop(adb_query_spec_t *spec, const char* dbName, Uns32T queryIndex);
   vector<vector<float> >* index_initialize_shingles(Uns32T sz);
   int index_init_query(const char* dbName);
   int index_exists(const char* dbName, double radius, Uns32T sequenceLength);