1#! /bin/bash 2 3export PATH=$PATH:../../.. 4 5#echo Generating 10 million entries. This might take a while 6#echo Generating dataset 7../Generator 1000000 0 > d 8awk '{if ($1 == 1) print $0}' < d > data 9awk '{if ($1 == 2) print $0}' < d > queries 10rm -rf d 11 12echo Creating new R-Tree 13../RTreeBulkLoad data tree 1000 0.9 14 15echo Querying R-Tree 16../RTreeQuery queries tree intersection > res 17cat data queries > .t 18 19echo Running exhaustive search 20../Exhaustive .t intersection > res2 21 22echo Comparing results 23sort -n res > a 24sort -n res2 > b 25if diff a b 26then echo "Same results with exhaustive search. Everything seems fine." 27else echo "PROBLEM! We got different results from exhaustive search!" 28fi 29echo Results: `wc -l a` 30rm -rf a b res res2 .t tree.* 31