Mercurial > hg > audiodb
comparison audioDB.cpp @ 156:d241a22593bb powertable
Fix qpPtr to point to the query point, if applicable.
author | mas01cr |
---|---|
date | Thu, 01 Nov 2007 14:43:19 +0000 |
parents | b251c49379d1 |
children | 9ec0f27e07b9 |
comparison
equal
deleted
inserted
replaced
155:b251c49379d1 | 156:d241a22593bb |
---|---|
1845 error("queryPoint > numVectors-wL+1 in query"); | 1845 error("queryPoint > numVectors-wL+1 in query"); |
1846 else{ | 1846 else{ |
1847 if(verbosity>1) { | 1847 if(verbosity>1) { |
1848 cerr << "query point: " << queryPoint << endl; cerr.flush(); | 1848 cerr << "query point: " << queryPoint << endl; cerr.flush(); |
1849 } | 1849 } |
1850 query=query+queryPoint*dbH->dim; | 1850 query = query + queryPoint * dbH->dim; |
1851 qnPtr=qnPtr+queryPoint; | 1851 qnPtr = qnPtr + queryPoint; |
1852 if (usingPower) { | |
1853 qpPtr = qpPtr + queryPoint; | |
1854 } | |
1852 numVectors=wL; | 1855 numVectors=wL; |
1853 } | 1856 } |
1854 | 1857 |
1855 double ** D = 0; // Differences query and target | 1858 double ** D = 0; // Differences query and target |
1856 double ** DD = 0; // Matched filter distance | 1859 double ** DD = 0; // Matched filter distance |
2329 error("queryPoint > numVectors-wL+1 in query"); | 2332 error("queryPoint > numVectors-wL+1 in query"); |
2330 else{ | 2333 else{ |
2331 if(verbosity>1) { | 2334 if(verbosity>1) { |
2332 cerr << "query point: " << queryPoint << endl; cerr.flush(); | 2335 cerr << "query point: " << queryPoint << endl; cerr.flush(); |
2333 } | 2336 } |
2334 query=query+queryPoint*dbH->dim; | 2337 query = query + queryPoint*dbH->dim; |
2335 qnPtr=qnPtr+queryPoint; | 2338 qnPtr = qnPtr + queryPoint; |
2339 if (usingPower) { | |
2340 qpPtr = qpPtr + queryPoint; | |
2341 } | |
2336 numVectors=wL; | 2342 numVectors=wL; |
2337 } | 2343 } |
2338 | 2344 |
2339 double ** D = 0; // Differences query and target | 2345 double ** D = 0; // Differences query and target |
2340 double ** DD = 0; // Matched filter distance | 2346 double ** DD = 0; // Matched filter distance |