summaryrefslogtreecommitdiffstats
path: root/Algorithms/Part-I/5-KdTrees/run.sh
blob: 1ddfb96abf0479bdd71f5a98a97432f775885cfe (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

export "CLASSPATH=$CLASSPATH:.:$HOME/algs4/algs4.jar:$HOME/algs4/stdlib.jar"

CLASSES="PointSET KdTree"

rm *.class *.zip 2>/dev/null

echo "javac RectHV.java" && javac RectHV.java
for kls in $CLASSES; do
    ~/algs4/bin/checkstyle ${kls}.java
    echo "javac ${kls}.java" && javac ${kls}.java || exit 1
done
~/algs4/bin/findbugs *.class

for kls in KdTreeVisualizer NearestNeighborVisualizer RangeSearchVisualizer; do
    echo "javac ${kls}.java" && javac ${kls}.java
done

echo "RUN..."
java KdTreeVisualizer circle10.txt
java RangeSearchVisualizer input10K.txt
java NearestNeighborVisualizer input10K.txt
java RangeSearchVisualizer input100K.txt
java NearestNeighborVisualizer input100K.txt
java RangeSearchVisualizer input1M.txt
java NearestNeighborVisualizer input1M.txt

zip kdtree.zip PointSET.java KdTree.java