# HG changeset patch # User mas01mc # Date 1231225331 0 # Node ID add65705e655ce517b9ae82c2160cd8a26c1901b # Parent 51d02229288f4df8f4045931d8776f7286a78fba added --no_unit_norming to SOAP interface, added this case to tests/0041 diff -r 51d02229288f -r add65705e655 audioDB.h --- a/audioDB.h Wed Dec 31 14:08:43 2008 +0000 +++ b/audioDB.h Tue Jan 06 07:02:11 2009 +0000 @@ -62,6 +62,7 @@ #define COM_ABSOLUTE_THRESH "--absolute-threshold" #define COM_EXHAUSTIVE "--exhaustive" #define COM_LSH_EXACT "--lsh_exact" +#define COM_NO_UNIT_NORMING "--no_unit_norming" // Because LSH returns NN with P(1)<1 we want to return exact // points above this boundary. diff -r 51d02229288f -r add65705e655 audioDBws.h --- a/audioDBws.h Wed Dec 31 14:08:43 2008 +0000 +++ b/audioDBws.h Tue Jan 06 07:02:11 2009 +0000 @@ -66,10 +66,10 @@ int adb__liszt(xsd__string dbName, xsd__int lisztOffset, xsd__int lisztLength, struct adb__lisztResponse &adbLisztResponse); // Query an existing adb database -int adb__query(xsd__string dbName, xsd__string qKey, xsd__string keyList, xsd__string timesFileName, xsd__string powerFileName, xsd__int qType, xsd__int qPos, xsd__int pointNN, xsd__int segNN, xsd__int segLen, xsd__double radius, xsd__double absolute_threshold, xsd__double relative_threshold, xsd__int exhaustive, xsd__int lsh_exact, struct adb__queryResponse &adbQueryResponse); +int adb__query(xsd__string dbName, xsd__string qKey, xsd__string keyList, xsd__string timesFileName, xsd__string powerFileName, xsd__int qType, xsd__int qPos, xsd__int pointNN, xsd__int segNN, xsd__int segLen, xsd__double radius, xsd__double absolute_threshold, xsd__double relative_threshold, xsd__int exhaustive, xsd__int lsh_exact, xsd__int no_unit_norming, struct adb__queryResponse &adbQueryResponse); -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); +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, xsd__int no_unit_norming, 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); +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, xsd__int no_unit_norming, struct adb__queryResponse &adbQueryResponse); diff -r 51d02229288f -r add65705e655 soap.cpp --- a/soap.cpp Wed Dec 31 14:08:43 2008 +0000 +++ b/soap.cpp Tue Jan 06 07:02:11 2009 +0000 @@ -55,7 +55,7 @@ queryType, queryPoint, pointNN, trackNN, sequenceLength, radius, absolute_threshold, relative_threshold, - !usingQueryPoint, lsh_exact, + !usingQueryPoint, lsh_exact, no_unit_norming, adbQueryResponse) == SOAP_OK) { if(radius == 0) { @@ -115,7 +115,8 @@ radius, absolute_threshold, usingQueryPoint, - lsh_exact, + lsh_exact, + no_unit_norming, adbQueryResponse)==SOAP_OK){ //std::std::cerr << "result list length:" << adbQueryResponse.result.__sizeRlist << std::std::endl; for(int i=0; i test-expected-output cmp testoutput test-expected-output +# make index, no_unit_norming +# Index with default LSH params +${AUDIODB} -d testdb -X -l 1 -R 0.9 --lsh_k 1 --no_unit_norming + +${AUDIODB} -c localhost:${WSPORT} -d testdb -Q nsequence -l 1 -f testquery -w testpower -p 0 -R 0.9 -n 2 --no_unit_norming --lsh_exact > testoutput +echo testfeature 3 > test-expected-output +echo testfeature 0 >> test-expected-output +cmp testoutput test-expected-output + + stop_server $! exit 104