aboutsummaryrefslogtreecommitdiff
blob: 1aaa9c7f866fc3634aa3f5a00628257df7654782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/bash

echo Generating dataset
../Generator 1000 > d
awk '{if ($2 != 2) print $0}' < d > data
awk '{if ($2 == 2) print $0}' < d > queries
rm -rf d

echo Creating new MVR-Tree
../MVRTreeLoad data tree 20 intersection

echo Querying MVR-Tree
../MVRTreeQuery queries tree intersection > res
cat data queries > .t

echo Running exhaustive search
../Exhaustive .t intersection > res2

echo Comparing results
sort -n res > a
sort -n res2 > b
if diff a b
then
echo "Same results with exhaustive search. Everything seems fine."
echo Results: `wc -l a`
rm -rf a b res res2 .t tree.*
else
echo "PROBLEM! We got different results from exhaustive search!"
fi