annotate tests/pointset_test/run-test.sh @ 369:6564be3109c5 gcc-4.3-cleanups

gcc-4.3 warning cleanups for lshlib.cpp (I do not believe that any of these changes contain significant copyrightable "intellectual property". However, to the extent that they do, the changes are hereby released into the Public Domain, and may be therefore be used by anyone for any purpose without need for consideration of any kind.)
author mas01cr
date Wed, 12 Nov 2008 15:23:32 +0000
parents 40dca0cbbffd
children
rev   line source
mas01mc@285 1 #! /bin/bash
mas01mc@285 2
mas01mc@285 3 . ../test-utils.sh
mas01mc@289 4 NPOINTS=100
mas01mc@289 5 NDIM=100
mas01mc@289 6 RADII="0.1 0.2 0.4 0.5 0.7 0.9 01 02 05 10"
mas01mc@289 7 LSH_W="01 04"
mas01mc@285 8
mas01mc@289 9 GENERATE_POINTS_AND_INSERT_IN_NEW_DB=true
mas01mc@289 10 if [ ${GENERATE_POINTS_AND_INSERT_IN_NEW_DB} ]
mas01mc@286 11 then
mas01mc@289 12 if [ -f testdb ]; then rm -f testdb; fi
mas01mc@289 13
mas01mc@289 14 ${AUDIODB} -d testdb -N
mas01mc@289 15
mas01mc@289 16 intstring 1 > testpower
mas01mc@289 17 floatstring -1 >> testpower
mas01mc@289 18
mas01mc@289 19 ${AUDIODB} -d testdb -P
mas01mc@289 20
mas01mc@289 21 if [ -d rad*[0-9]* ]; then rm -r rad*[0-9]*; fi
mas01mc@289 22
mas01mc@289 23 for j in ${RADII}
mas01mc@286 24 do
mas01mc@287 25 R_SQ=`echo "scale=6; $j^2" | bc`
mas01mc@289 26 mkdir -p "rad$j"
mas01mc@289 27 ./genpoints2 ${NPOINTS} ${R_SQ} ${NDIM}
mas01mc@289 28 mv testfeature* "rad$j"
mas01mc@286 29 done
mas01mc@289 30
mas01mc@289 31 for i in rad*[0-9]*/*
mas01mc@289 32 do
mas01mc@289 33 ${AUDIODB} -d testdb -I -f $i -w testpower
mas01mc@289 34 done
mas01mc@289 35
mas01mc@289 36 # sequence queries require L2NORM
mas01mc@289 37 ${AUDIODB} -d testdb -L
mas01mc@286 38 fi
mas01mc@285 39
mas01mc@289 40 for W in ${LSH_W}
mas01mc@289 41 do
mas01mc@289 42 for LOOP1 in 1 2 3 4 5 6 7 8 9 10
mas01mc@289 43 do
mas01mc@289 44 for LOOP2 in 1 2 3 4 5
mas01mc@289 45 do
mas01mc@289 46 rm -f testdb.lsh.*
mas01mc@289 47
mas01mc@289 48 # LSH_W=1
mas01mc@289 49 LSH_K=1
mas01mc@289 50 LSH_M=1
mas01mc@289 51 LSH_N=1000
mas01mc@289 52
mas01mc@289 53 INDEXING=true
mas01mc@289 54 if [ ${INDEXING} ]
mas01mc@289 55 then
mas01mc@289 56 for j in ${RADII}
mas01mc@289 57 do
mas01mc@289 58 R_SQ=`echo "scale=6; $j^2" | bc`
mas01mc@289 59 ${AUDIODB} -d testdb -X -R ${R_SQ} -l 1 --lsh_N ${LSH_N} \
mas01mc@290 60 --lsh_b ${LSH_N} --lsh_k ${LSH_K} --lsh_m ${LSH_M} --lsh_w ${W} --lsh_ncols 1000 \
mas01mc@289 61 --absolute-threshold -1 --no_unit_norming
mas01mc@289 62 done
mas01mc@289 63 fi
mas01mc@289 64
mas01mc@287 65 #if [ -f cumulativeResult.txt ]; then rm -f cumulativeResult.txt;fi
mas01mc@289 66
mas01mc@289 67 for j in ${RADII}
mas01mc@289 68 do
mas01mc@289 69 R_SQ=`echo "scale=6; $j^2" | bc`
mas01mc@289 70 ${AUDIODB} \
mas01mc@289 71 -d testdb -Q sequence -R ${R_SQ} -l 1 -e \
mas01mc@289 72 -f queryfeature -w testpower --absolute-threshold -1 --no_unit_norming -r 1000 > output${j}
mas01mc@289 73 echo `for k in ${RADII};do egrep "^rad$k" output${j} | wc | awk '{print $1}';done` >> cumulativeResult_k1_w${W}_m1_${NDIM}.txt
mas01mc@289 74 done
mas01mc@289 75 done
mas01mc@289 76 done
mas01mc@286 77 done
mas01mc@286 78
mas01mc@287 79 #Perform exact search as a sanity test
mas01mc@287 80 #rm -f *.lsh*
mas01mc@287 81 #echo
mas01mc@287 82 #for j in .01 .02 .03 .05 01 02 03 05 09 10
mas01mc@287 83 # do
mas01mc@287 84 # R_SQ=`echo "scale=6; $j^2" | bc`
mas01mc@287 85 # ${AUDIODB} \
mas01mc@287 86 # -d testdb -Q sequence -R ${R_SQ} -l 1 -e \
mas01mc@287 87 # -f queryfeature -w testpower --absolute-threshold -1 --no_unit_norming -r 1000 > outputEUC
mas01mc@287 88 # echo EUC points retrieved at Radius $j: \
mas01mc@287 89 #`for k in .01 .02 .03 .05 01 02 03 05 09 10; do egrep "^rad$k" outputEUC | wc | awk '{print $1}';done`
mas01mc@287 90 #done
mas01mc@287 91
mas01mc@287 92 #Inspect the indexing parameters
mas01mc@287 93 #echo
mas01mc@287 94 #egrep "^INDEX:" output[1-9]
mas01mc@287 95 #echo
mas01mc@287 96