mas01mc@414: #! /bin/bash mas01mc@414: mas01mc@414: . ../test-utils.sh mas01mc@414: mas01mc@414: if [ -f testdb ]; then rm -f testdb; fi mas01mc@414: mas01mc@414: ${AUDIODB} -d testdb -N mas01mc@414: mas01mc@414: intstring 2 > testfeature mas01mc@414: floatstring 0 1 >> testfeature mas01mc@414: floatstring 1 0 >> testfeature mas01mc@414: floatstring 1 0 >> testfeature mas01mc@414: floatstring 0 1 >> testfeature mas01mc@414: mas01mc@414: intstring 1 > testpower mas01mc@414: floatstring -0.5 >> testpower mas01mc@414: floatstring -1 >> testpower mas01mc@414: floatstring -1 >> testpower mas01mc@414: floatstring -0.5 >> testpower mas01mc@414: mas01mc@414: ${AUDIODB} -d testdb -L mas01mc@414: ${AUDIODB} -d testdb -P mas01mc@414: mas01mc@414: # insert two instances of the same feature mas01mc@414: ${AUDIODB} -d testdb -I -f testfeature -w testpower -k testfeatureA mas01mc@414: ${AUDIODB} -d testdb -I -f testfeature -w testpower -k testfeatureB mas01mc@414: mas01mc@414: mas01mc@414: echo "query points (0.0,0.5),(0.0,0.5),(0.5,0.0)" mas01mc@414: intstring 2 > testquery mas01mc@414: floatstring 0 0.5 >> testquery mas01mc@414: floatstring 0 0.5 >> testquery mas01mc@414: floatstring 0.5 0 >> testquery mas01mc@414: mas01mc@414: # LSH Indexed query with restrict list test mas01mc@414: mas01mc@414: # Index with default LSH params mas01mc@414: ${AUDIODB} -d testdb -X -l 1 -R 1 mas01mc@414: mas01mc@414: # Query using the index mas01mc@414: mas01mc@414: echo testfeatureB > test-restrict-list mas01mc@414: ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -w testpower -K test-restrict-list -R 1 > testoutput mas01mc@414: echo testfeatureB 1 > test-expected-output mas01mc@414: mas01mc@414: cmp testoutput test-expected-output mas01mc@414: mas01mc@414: exit 104