# This script runs the "structure" experiment.
# The results are written to log files.

# set java class path
oldclasspath=${CLASSPATH}
CLASSPATH=.
for i in lib/*.jar ; do CLASSPATH=${CLASSPATH}:${i} ; done

# q=3, vary p
for p in 1 2 3 4 ; do 
    echo Log file: log/leaves_p${p}q3 
    java executable.StructureChanges data/tree144 -l 20 ${p} 3 \
	> log/leaves_p${p}q3 
    echo Log file: log/internal_p${p}q3 
    java executable.StructureChanges data/tree144 -i 20 ${p} 3 \
	> log/internal_p${p}q3 
done

# p=2, vary q
for q in 1 2 3 4 ; do 
    echo Log file: log/leaves_p2q${q} 
    java executable.StructureChanges data/tree144 -l 20 2 ${q} \
	> log/leaves_p2q${q} 
    echo Log file: log/internal_p2q${q}
    java executable.StructureChanges data/tree144 -i 20 2 ${q} \
	> log/internal_p2q${q}
done

# restore java classpath
CLASSPATH=${oldclasspath}
