Skip to content

Commit

Permalink
update for symmetric sketching, update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pghysels committed Jun 20, 2024
1 parent 6e232df commit c900dd3
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 108 deletions.
191 changes: 101 additions & 90 deletions experiments/pp_cov.sh
Original file line number Diff line number Diff line change
@@ -1,101 +1,102 @@
#!/bin/bash

out=out_cov
out=out_cov_symm
comp=stable

dim=3

for k in 9 19 29; do
for tol in 1e-2 1e-4 1e-6; do
rm -rf tmp*
for nnz in 1 2 4 8; do
grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $2}' > tmp_err_med_nnz${nnz}
grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $3}' > tmp_err_min_nnz${nnz}
grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $4}' > tmp_err_max_nnz${nnz}
done
grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $2}' >> tmp_err_med_gaussian
grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $3}' >> tmp_err_min_gaussian
grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $4}' >> tmp_err_max_gaussian
grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $2}' >> tmp_err_med_srht
grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $3}' >> tmp_err_min_srht
grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $4}' >> tmp_err_max_srht
case $tol in
1e-2)
color='red'
mark='';;
1e-4)
color='green'
mark='square';;
1e-6)
color='blue'
mark='triangle';;
esac
printf '\t\\addplot[color=%s, mark=%s*, only marks, mark size=2pt, error bars/.cd, y dir=both,y explicit]\n' $color $mark
printf '\tcoordinates { %% %s, %s\n' $tol $k
printf '\t\t(G, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_gaussian` `cat tmp_err_min_gaussian` `cat tmp_err_max_gaussian`
printf '\t\t(S1, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_nnz1` `cat tmp_err_min_nnz1` `cat tmp_err_max_nnz1`
printf '\t\t(S2, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_nnz2` `cat tmp_err_min_nnz2` `cat tmp_err_max_nnz2`
printf '\t\t(S4, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_nnz4` `cat tmp_err_min_nnz4` `cat tmp_err_max_nnz4`
printf '\t\t(S8, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_nnz8` `cat tmp_err_min_nnz8` `cat tmp_err_max_nnz8`
printf '\t\t(H, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_srht` `cat tmp_err_min_srht` `cat tmp_err_max_srht`
printf '\t};\n'
echo ""
done
done
# for k in 9 19 29; do
# for tol in 1e-2 1e-4 1e-6; do
# rm -rf tmp*
# for nnz in 1 2 4 8; do
# grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $2}' > tmp_err_med_nnz${nnz}
# grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $3}' > tmp_err_min_nnz${nnz}
# grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $4}' > tmp_err_max_nnz${nnz}
# done
# grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $2}' >> tmp_err_med_gaussian
# grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $3}' >> tmp_err_min_gaussian
# grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $4}' >> tmp_err_max_gaussian
# grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $2}' >> tmp_err_med_srht
# grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $3}' >> tmp_err_min_srht
# grep "errors:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $4}' >> tmp_err_max_srht
# case $tol in
# 1e-2)
# color='red'
# mark='';;
# 1e-4)
# color='green'
# mark='square';;
# 1e-6)
# color='blue'
# mark='triangle';;
# esac
# printf '\t\\addplot[color=%s, mark=%s*, only marks, mark size=2pt, error bars/.cd, y dir=both,y explicit]\n' $color $mark
# printf '\tcoordinates { %% %s, %s\n' $tol $k
# printf '\t\t(G, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_gaussian` `cat tmp_err_min_gaussian` `cat tmp_err_max_gaussian`
# printf '\t\t(S1, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_nnz1` `cat tmp_err_min_nnz1` `cat tmp_err_max_nnz1`
# printf '\t\t(S2, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_nnz2` `cat tmp_err_min_nnz2` `cat tmp_err_max_nnz2`
# printf '\t\t(S4, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_nnz4` `cat tmp_err_min_nnz4` `cat tmp_err_max_nnz4`
# printf '\t\t(S8, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_nnz8` `cat tmp_err_min_nnz8` `cat tmp_err_max_nnz8`
# printf '\t\t(H, %s) -= (0, %s) += (0, %s)\n' `cat tmp_err_med_srht` `cat tmp_err_min_srht` `cat tmp_err_max_srht`
# printf '\t};\n'
# echo ""
# done
# done


for k in 9 19 29; do
for tol in 1e-2 1e-4 1e-6; do
rm -rf tmp*
for nnz in 1 2 4 8; do
grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $2}' > tmp_ranks_med_nnz${nnz}
grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $3}' > tmp_ranks_min_nnz${nnz}
grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $4}' > tmp_ranks_max_nnz${nnz}
done
grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $2}' >> tmp_ranks_med_gaussian
grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $3}' >> tmp_ranks_min_gaussian
grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $4}' >> tmp_ranks_max_gaussian
grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $2}' >> tmp_ranks_med_srht
grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $3}' >> tmp_ranks_min_srht
grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $4}' >> tmp_ranks_max_srht
case $tol in
1e-2)
color='red'
mark='';;
1e-4)
color='green'
mark='square';;
1e-6)
color='blue'
mark='triangle';;
esac
# case $k in
# 10000) mark='';;
# 20000) mark='square';;
# 40000) mark='triangle';;
# esac
# case $tol in
# 1e-2) color='red';;
# 1e-4) color='green';;
# 1e-6) color='blue';;
# esac
printf '\t\\addplot[color=%s, mark=%s*, only marks, mark size=2pt, error bars/.cd, y dir=both,y explicit]\n' $color $mark
printf '\tcoordinates { %% %s, %s\n' $tol $k
printf '\t\t(G, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_gaussian` `cat tmp_ranks_min_gaussian` `cat tmp_ranks_max_gaussian`
printf '\t\t(S1, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_nnz1` `cat tmp_ranks_min_nnz1` `cat tmp_ranks_max_nnz1`
printf '\t\t(S2, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_nnz2` `cat tmp_ranks_min_nnz2` `cat tmp_ranks_max_nnz2`
printf '\t\t(S4, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_nnz4` `cat tmp_ranks_min_nnz4` `cat tmp_ranks_max_nnz4`
printf '\t\t(S8, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_nnz8` `cat tmp_ranks_min_nnz8` `cat tmp_ranks_max_nnz8`
printf '\t\t(H, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_srht` `cat tmp_ranks_min_srht` `cat tmp_ranks_max_srht`
printf '\t};\n'
echo ""
# for k in 9 19 29; do
# for tol in 1e-2 1e-4 1e-6; do
# rm -rf tmp*
# for nnz in 1 2 4 8; do
# grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $2}' > tmp_ranks_med_nnz${nnz}
# grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $3}' > tmp_ranks_min_nnz${nnz}
# grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{print $4}' > tmp_ranks_max_nnz${nnz}
# done
# grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $2}' >> tmp_ranks_med_gaussian
# grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $3}' >> tmp_ranks_min_gaussian
# grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $4}' >> tmp_ranks_max_gaussian
# grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $2}' >> tmp_ranks_med_srht
# grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $3}' >> tmp_ranks_min_srht
# grep "ranks:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SRHT | awk '{print $4}' >> tmp_ranks_max_srht
# case $tol in
# 1e-2)
# color='red'
# mark='';;
# 1e-4)
# color='green'
# mark='square';;
# 1e-6)
# color='blue'
# mark='triangle';;
# esac
# # case $k in
# # 10000) mark='';;
# # 20000) mark='square';;
# # 40000) mark='triangle';;
# # esac
# # case $tol in
# # 1e-2) color='red';;
# # 1e-4) color='green';;
# # 1e-6) color='blue';;
# # esac
# printf '\t\\addplot[color=%s, mark=%s*, only marks, mark size=2pt, error bars/.cd, y dir=both,y explicit]\n' $color $mark
# printf '\tcoordinates { %% %s, %s\n' $tol $k
# printf '\t\t(G, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_gaussian` `cat tmp_ranks_min_gaussian` `cat tmp_ranks_max_gaussian`
# printf '\t\t(S1, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_nnz1` `cat tmp_ranks_min_nnz1` `cat tmp_ranks_max_nnz1`
# printf '\t\t(S2, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_nnz2` `cat tmp_ranks_min_nnz2` `cat tmp_ranks_max_nnz2`
# printf '\t\t(S4, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_nnz4` `cat tmp_ranks_min_nnz4` `cat tmp_ranks_max_nnz4`
# printf '\t\t(S8, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_nnz8` `cat tmp_ranks_min_nnz8` `cat tmp_ranks_max_nnz8`
# printf '\t\t(H, %s) -= (0, %s) += (0, %s)\n' `cat tmp_ranks_med_srht` `cat tmp_ranks_min_srht` `cat tmp_ranks_max_srht`
# printf '\t};\n'
# echo ""

done
done
# done
# done

for tol in 1e-2 1e-4 1e-6; do
echo $tol
for k in 9 19 29; do
echo "# $tol"
# for k in 9 19 29; do
for k in 29; do
rm -rf tmp*
for nnz in 1 2 4 8; do
grep "A\*S time\|AT\*S time" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{sum+=$5} END {print sum/3.0/1000.0}' > tmp_sample_nnz${nnz}
Expand All @@ -110,10 +111,20 @@ for tol in 1e-2 1e-4 1e-6; do

grep "Number of unknowns:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $4/1000.0}' >> tmp_N_gaussian
grep "\% of dense" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $6}' | tail -n 1 | sed 's/%//'>> tmp_compr
# printf '& & %s & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.1f \\\\ \n' $k `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht` `cat tmp_constr_gaussian` `cat tmp_constr_nnz1` `cat tmp_constr_nnz2` `cat tmp_constr_nnz4` `cat tmp_constr_nnz8` `cat tmp_constr_srht` `cat tmp_compr`
# printf '& & %s & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %5.1f \\\\ \n' $k `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht` `cat tmp_constr_gaussian` `cat tmp_constr_nnz1` `cat tmp_constr_nnz2` `cat tmp_constr_nnz4` `cat tmp_constr_nnz8` `cat tmp_constr_srht` `cat tmp_compr`

printf '(G, %3.3g)\n (S1, %3.3g)\n (S2, %3.3g)\n (S4, %3.3g)\n (S8, %3.3g)\n (H, %3.3g)\n\n' `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht`

printf '(G, %3.3g)\n (S1, %3.3g)\n (S2, %3.3g)\n (S4, %3.3g)\n (S8, %3.3g)\n (H, %3.3g)\n\n %3.3g' \
`paste tmp_sample_gaussian tmp_constr_gaussian | awk '{print $2-$1}'` \
`paste tmp_sample_nnz1 tmp_constr_nnz1 | awk '{print $2-$1}'` \
`paste tmp_sample_nnz2 tmp_constr_nnz2 | awk '{print $2-$1}'` \
`paste tmp_sample_nnz4 tmp_constr_nnz4 | awk '{print $2-$1}'` \
`paste tmp_sample_nnz8 tmp_constr_nnz8 | awk '{print $2-$1}'` \
`paste tmp_sample_srht tmp_constr_srht | awk '{print $2-$1}'` \
`cat tmp_constr_gaussian`


# printf '& & %s & %5.3f & %5.3f & %5.3f & %5.3f & %5.3f & %5.3f & %5.3f & %5.3f & %5.3f & %5.3f & %5.3f & %5.3f & %5.1f \\\\ \n' $k `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht` `cat tmp_constr_gaussian` `cat tmp_constr_nnz1` `cat tmp_constr_nnz2` `cat tmp_constr_nnz4` `cat tmp_constr_nnz8` `cat tmp_constr_srht` `cat tmp_compr`
printf '& & %s & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %5.1f \\\\ \n' $k `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht` `cat tmp_constr_gaussian` `cat tmp_constr_nnz1` `cat tmp_constr_nnz2` `cat tmp_constr_nnz4` `cat tmp_constr_nnz8` `cat tmp_constr_srht` `cat tmp_compr`
done
echo ""
done
Expand Down
18 changes: 15 additions & 3 deletions experiments/pp_front.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

out=out_front
out=out_front_symm
comp=stable

for k in 100 150 200; do
Expand Down Expand Up @@ -93,7 +93,8 @@ done

for tol in 1e-2 1e-4 1e-6; do
echo $tol
for k in 100 150 200; do
# for k in 100 150 200; do
for k in 200; do
rm -rf tmp*
for nnz in 1 2 4 8; do
grep "A\*S time\|AT\*S time" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{sum+=$5} END {print sum/3.0/1000.0}' > tmp_sample_nnz${nnz}
Expand All @@ -108,7 +109,18 @@ for tol in 1e-2 1e-4 1e-6; do

grep "Number of unknowns:" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $4/1000.0}' >> tmp_N_gaussian
grep "\% of dense" ${out}/out_dim${dim}_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $6}' | tail -n 1 | sed 's/%//'>> tmp_compr
printf '& & %s & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %5.1f \\\\ \n' $k `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht` `cat tmp_constr_gaussian` `cat tmp_constr_nnz1` `cat tmp_constr_nnz2` `cat tmp_constr_nnz4` `cat tmp_constr_nnz8` `cat tmp_constr_srht` `cat tmp_compr`
# printf '& & %s & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %3.4g & %5.1f \\\\ \n' $k `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht` `cat tmp_constr_gaussian` `cat tmp_constr_nnz1` `cat tmp_constr_nnz2` `cat tmp_constr_nnz4` `cat tmp_constr_nnz8` `cat tmp_constr_srht` `cat tmp_compr`

printf '(G, %3.3g)\n (S1, %3.3g)\n (S2, %3.3g)\n (S4, %3.3g)\n (S8, %3.3g)\n (H, %3.3g)\n\n' `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht`
printf '(G, %3.3g)\n (S1, %3.3g)\n (S2, %3.3g)\n (S4, %3.3g)\n (S8, %3.3g)\n (H, %3.3g)\n\n %3.3g' \
`paste tmp_sample_gaussian tmp_constr_gaussian | awk '{print $2-$1}'` \
`paste tmp_sample_nnz1 tmp_constr_nnz1 | awk '{print $2-$1}'` \
`paste tmp_sample_nnz2 tmp_constr_nnz2 | awk '{print $2-$1}'` \
`paste tmp_sample_nnz4 tmp_constr_nnz4 | awk '{print $2-$1}'` \
`paste tmp_sample_nnz8 tmp_constr_nnz8 | awk '{print $2-$1}'` \
`paste tmp_sample_srht tmp_constr_srht | awk '{print $2-$1}'` \
`cat tmp_constr_gaussian`

done
echo ""
done
Expand Down
20 changes: 16 additions & 4 deletions experiments/pp_qc.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

out=out_qc
out=out_qc_symm
comp=stable

for k in 10000 20000 40000; do
Expand Down Expand Up @@ -94,7 +94,8 @@ done

for tol in 1e-2 1e-4 1e-6; do
echo $tol
for k in 10000 20000 40000; do
# for k in 10000 20000 40000; do
for k in 40000; do
rm -rf tmp*
for nnz in 1 2 4 8; do
grep "A\*S time\|AT\*S time" ${out}/out_dim_k${k}*tol${tol}*${comp}_SJLT_nnz${nnz} | awk '{sum+=$5} END {print sum/3./1000.0}' > tmp_sample_nnz${nnz}
Expand All @@ -109,8 +110,19 @@ for tol in 1e-2 1e-4 1e-6; do

grep "Number of unknowns:" ${out}/out_dim_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $4/1000.0}' >> tmp_N_gaussian
grep "\% of dense" ${out}/out_dim_k${k}*tol${tol}*${comp}_Gaussian | awk '{print $6}' | tail -n 1 | sed 's/%//'>> tmp_compr
# printf '& & %s & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.0f & %5.1f \\\\ \n' $k `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht` `cat tmp_constr_gaussian` `cat tmp_constr_nnz1` `cat tmp_constr_nnz2` `cat tmp_constr_nnz4` `cat tmp_constr_nnz8` `cat tmp_constr_srht` `cat tmp_compr`
printf '& & %s & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %5.1f \\\\ \n' $k `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht` `cat tmp_constr_gaussian` `cat tmp_constr_nnz1` `cat tmp_constr_nnz2` `cat tmp_constr_nnz4` `cat tmp_constr_nnz8` `cat tmp_constr_srht` `cat tmp_compr`
# printf '& & %s & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %3.3g & %5.1f \\\\ \n' $k `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht` `cat tmp_constr_gaussian` `cat tmp_constr_nnz1` `cat tmp_constr_nnz2` `cat tmp_constr_nnz4` `cat tmp_constr_nnz8` `cat tmp_constr_srht` `cat tmp_compr`

printf '(G, %3.3g)\n (S1, %3.3g)\n (S2, %3.3g)\n (S4, %3.3g)\n (S8, %3.3g)\n (H, %3.3g)\n\n' `cat tmp_sample_gaussian` `cat tmp_sample_nnz1` `cat tmp_sample_nnz2` `cat tmp_sample_nnz4` `cat tmp_sample_nnz8` `cat tmp_sample_srht`

printf '(G, %3.3g)\n (S1, %3.3g)\n (S2, %3.3g)\n (S4, %3.3g)\n (S8, %3.3g)\n (H, %3.3g)\n\n %3.3g' \
`paste tmp_sample_gaussian tmp_constr_gaussian | awk '{print $2-$1}'` \
`paste tmp_sample_nnz1 tmp_constr_nnz1 | awk '{print $2-$1}'` \
`paste tmp_sample_nnz2 tmp_constr_nnz2 | awk '{print $2-$1}'` \
`paste tmp_sample_nnz4 tmp_constr_nnz4 | awk '{print $2-$1}'` \
`paste tmp_sample_nnz8 tmp_constr_nnz8 | awk '{print $2-$1}'` \
`paste tmp_sample_srht tmp_constr_srht | awk '{print $2-$1}'` \
`cat tmp_constr_gaussian`

done
echo ""
done
Expand Down
Loading

0 comments on commit c900dd3

Please sign in to comment.