diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-07-03 22:08:37 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-07-03 22:08:37 +0200 |
commit | 4caa4c02dbf30f54b3f032cb91a6ce18bd9347b5 (patch) | |
tree | 3d25ca48ad6f65ff3dba896c550722776f2c94d3 /01-knapsack/run | |
parent | 2af09773676cc4c60d22688f6125605859acc61b (diff) | |
download | coursera-4caa4c02dbf30f54b3f032cb91a6ce18bd9347b5.zip coursera-4caa4c02dbf30f54b3f032cb91a6ce18bd9347b5.tar.gz |
Discrete : 01-knapsack: start speed seach => ks_dp-ng.c
Diffstat (limited to '01-knapsack/run')
-rwxr-xr-x | 01-knapsack/run | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/01-knapsack/run b/01-knapsack/run new file mode 100755 index 0000000..df6db5e --- /dev/null +++ b/01-knapsack/run @@ -0,0 +1,18 @@ +#! /bin/bash + +RESET="\033[0m" +RED="\033[0;31m" + +BIN=${BIN:-ks_dp-ng} +${CC:-clang} -O2 -pedantic -Wall -o $BIN $BIN.c || exit 1 + +DATAS=(ks_4_0 ks_19_0 ks_30_0 ks_40_0 ks_45_0 ks_50_0 ks_50_1 ks_60_0 ks_100_0 ks_100_1 ks_100_2 ks_200_0 ks_200_1 ks_300_0 ks_400_0 ks_500_0 ks_1000_0 ks_10000_0) +VALUES=(19 12248 99798 99924 23974 142156 5345 99837 99837 1333930 10892 100236 1103604 1688692 3967180 54939 109899 1099893) + +for((i=0;i<${#DATAS[@]};i++)) +do + data="./data/${DATAS[$i]}" + value="${VALUES[$i]}" + echo -e "$RED *** $data -e $value $@ $RESET" + ./$BIN $data -e $value $@ +done |