# HG changeset patch
# User mas01mc
# Date 1226060323 0
# Node ID 1662745233d919e2211963e2f96a18cda2db4275
# Parent a22b18005853f0daa7d26aed38868e44f87fca08
serialized features query complete and tested
diff -r a22b18005853 -r 1662745233d9 QueryADB.py
--- a/QueryADB.py Thu Nov 06 22:57:39 2008 +0000
+++ b/QueryADB.py Fri Nov 07 12:18:43 2008 +0000
@@ -100,12 +100,17 @@
%s
%s
+
-1.0
' - pointNN = '10' - trackNN = '5' - queryRadius = '0.5' + queryVector='-1.0
-1.0
' + queryPos = '0' + pointNN = '2' + trackNN = '2' + radius = '0.0' absoluteThreshold = '-4.5' + relativeThreshold = '0' + exhaustive = '0' lshExact = '0' message = SHINGLE_QUERY_TEMPLATE - message = SHINGLE_QUERY_TEMPLATE%(dbName, featureDim, queryVector, powerVector, pointNN, trackNN, queryRadius, absoluteThreshold, lshExact); + message = SHINGLE_QUERY_TEMPLATE%(dbName, featureDim, queryVector, powerVector, queryPos, pointNN, trackNN, radius, absoluteThreshold, relativeThreshold, exhaustive, lshExact); # print message print message response = SendXMLCommand(message) diff -r a22b18005853 -r 1662745233d9 audioDBws.h --- a/audioDBws.h Thu Nov 06 22:57:39 2008 +0000 +++ b/audioDBws.h Fri Nov 07 12:18:43 2008 +0000 @@ -71,5 +71,5 @@ // Query an adb database by key int adb__sequenceQueryByKey(xsd__string dbName,xsd__string trackKey, xsd__string featureFileName, xsd__int queryType,xsd__string trackFileName,xsd__string timesFileName,xsd__int queryPoint,xsd__int pointNN,xsd__int trackNN,xsd__int sequenceLength,xsd__double radius,xsd__double absolute_threshold,xsd__int usingQueryPoint,xsd__int lsh_exact,struct adb__queryResponse &adbQueryResponse); -// Query an audioDB database by vector (serialized) -int adb__shingleQuery(xsd__string dbName, struct adb__queryVector qVector, xsd__int queryType, xsd__int pointNN, xsd__int trackNN, xsd__int sequenceLength, xsd__double radius, xsd__double absolute_threshold, xsd__int lsh_exact, struct adb__queryResponse &adbQueryResponse); +// Query an audioDB database by vector (serialized), queryKey/featureFileName is here replaced with qVector +int adb__shingleQuery(xsd__string dbName, struct adb__queryVector qVector, xsd__string keyList, xsd__string timesFileName, xsd__int queryType, xsd__int queryPos, xsd__int pointNN, xsd__int trackNN, xsd__int sequenceLength, xsd__double radius, xsd__double absolute_threshold, xsd__double relative_threshold, xsd__int exhaustive, xsd__int lsh_exact, struct adb__queryResponse &adbQueryResponse); diff -r a22b18005853 -r 1662745233d9 soap.cpp --- a/soap.cpp Thu Nov 06 22:57:39 2008 +0000 +++ b/soap.cpp Fri Nov 07 12:18:43 2008 +0000 @@ -282,7 +282,6 @@ } argv[argv_counter] = NULL; - try { audioDB(argc, (char* const*)argv, &adbQueryResponse); delete [] argv; @@ -359,7 +358,7 @@ } // Query an audioDB database by vector (serialized) -int adb__shingleQuery(struct soap* soap, xsd__string dbName, struct adb__queryVector qVector, xsd__int queryType,xsd__int pointNN,xsd__int trackNN,xsd__int sequenceLength,xsd__double radius,xsd__double absolute_threshold,xsd__int lsh_exact,struct adb__queryResponse &adbQueryResponse){ +int adb__shingleQuery(struct soap* soap, xsd__string dbName, struct adb__queryVector qVector, xsd__string keyList, xsd__string timesFileName, xsd__int queryType, xsd__int queryPos, xsd__int pointNN, xsd__int trackNN, xsd__int sequenceLength, xsd__double radius, xsd__double absolute_threshold, xsd__double relative_threshold, xsd__int exhaustive, xsd__int lsh_exact, struct adb__queryResponse &adbQueryResponse){ cout << "qvector[" << qVector.dim << " x " << qVector.__sizev/qVector.dim << "]: "; for(int k=0; k < qVector.__sizev ; k++) @@ -424,9 +423,10 @@ // and the feature dimensionality if(!sequenceLength) sequenceLength = qVector.__sizev/qVector.dim; - // int retVal = adb__sequenceQueryByKey(soap, dbName, "", tmpFileName, queryType,"","",0,pointNN,trackNN,sequenceLength,radius,absolute_threshold,1,lsh_exact,adbQueryResponse); -int retVal = adb__query(soap, dbName, tmpFileName, "", "", qVector.__sizep?tmpFileName2:0, queryType, 0, pointNN, trackNN, sequenceLength,radius, absolute_threshold, 0,0, lsh_exact,adbQueryResponse); + int retVal = adb__query(soap, dbName, tmpFileName, keyList, timesFileName, qVector.__sizep?tmpFileName2:0, + queryType, queryPos, pointNN, trackNN, sequenceLength, radius, + absolute_threshold, relative_threshold, exhaustive, lsh_exact, adbQueryResponse); return retVal; }