File: run

package info (click to toggle)
spatialindex 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,312 kB
  • sloc: cpp: 51,468; python: 3,886; ansic: 848; sh: 375; makefile: 155
file content (34 lines) | stat: -rwxr-xr-x 784 bytes parent folder | download
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
30
31
32
33
34
#! /bin/sh

set -e

#echo Generating 10 million entries. This might take a while
#echo Generating dataset
test-rtree-Generator 1000000 0 > d
awk '{if ($1 == 1) print $0}' < d > data
awk '{if ($1 == 2) print $0}' < d > queries
rm -rf d

echo Creating new R-Tree
test-rtree-RTreeBulkLoad data tree 1000 0.9

echo Querying R-Tree
test-rtree-RTreeQuery queries tree intersection > res
cat data queries > .t

echo Running exhaustive search
test-rtree-Exhaustive .t intersection > res2

echo Comparing results
sort -n res > a
sort -n res2 > b

set +e
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!"
    exit 1
fi