Procházet zdrojové kódy

* Various cosmetic changes.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/research@2279 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam před 16 roky
rodič
revize
d981f9f8d4
3 změnil soubory, kde provedl 27 přidání a 10 odebrání
  1. +8
    -2
      2008-displacement/README
  2. +8
    -4
      2008-displacement/main.c
  3. +11
    -4
      2008-displacement/study-5.sh

+ 8
- 2
2008-displacement/README Zobrazit soubor

@@ -1,6 +1,6 @@
# Trouver des images au pif
% find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].??g' | rev | sort -k2 -t. | rev | xargs -n 1 ./main | tee fs-4chan.txt
% find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].??g' | rev | sort -k2 -t. | rev | xargs -n 1 ./main-jajuni | tee jajuni-4chan.txt
% find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].???' | rev | sort -k2 -t. | rev | xargs -n 1 ./main | tee fs-4chan.txt
% find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].???' | rev | sort -k2 -t. | rev | xargs -n 1 ./main-jajuni | tee jajuni-4chan.txt
% cat /tmp/4chanlist.txt | xargs -n 1 ./main | tee -a fs-4chan.txt

# Lena
@@ -189,3 +189,9 @@ boat.png elaine.png texture[2345].png
scp canard.zoy.org:out-'*'.txt .
for x in out-*.txt; do sort -k7 $x | head -20 ; done | cut -f1 -d: | sort | uniq -c | sort -n

### Pour faire des répertoires
for x in $(seq -w 00 09); do echo $x; mkdir -p /tmp/4chan/$x; cp $(find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$x'.???') /tmp/4chan/$x; done

### Conversion du vieux format de résultats
cat -n $x | sed 's/^ *[0-9]*\([0-9]\)[[:space:]]*/[\1] /' | sed 's/....###/###/' | sed 's/\[[27]/[1/; s/\[[38]/[2/; s/\[[49]/[3/; s/\[[50]/[4/'


+ 8
- 4
2008-displacement/main.c Zobrazit soubor

@@ -556,7 +556,7 @@ static void study(float const *src, float const *dest,

free(tmp);

printf("E = %g E_fast = %g E_min = %g dx = %g dy = %g\n",
printf("E: %g E_fast: %g E_min: %g dx: %g dy: %g\n",
1000. * e0, 1000. * e1, 1000. * best, fx, fy);
fflush(stdout);
}
@@ -684,8 +684,8 @@ int main(int argc, char *argv[])
#endif
/* We only want 4-cell kernels for now */
if(b2) continue;
//printf("K = %d,%d,%d,%d,%d ", a2, b2, c2, d2, e2);
printf("K = %d,%d,%d,%d ", a2, c2, d2, e2);
//printf("K: %d,%d,%d,%d,%d ", a2, b2, c2, d2, e2);
printf("K: %d,%d,%d,%d ", a2, c2, d2, e2);

dest = ed(src, false, a2, 0,
b2, c2, d2, e2, 0,
@@ -698,7 +698,7 @@ int main(int argc, char *argv[])
{
tmp = gauss(src, mat);
tmp2 = gauss(dest, mat);
printf("E = %.5g\n", 1000. * dist(tmp, tmp2, 1.));
printf("E: %.5g\n", 1000. * dist(tmp, tmp2, 1.));
free(tmp);
free(tmp2);
}
@@ -717,22 +717,26 @@ int main(int argc, char *argv[])
dest = ed(src, false, 7, 0,
0, 3, 5, 1, 0,
0, 0, 0, 0, 0);
printf("[1] ");
study(src, dest, 1.2, 0.001, .16, .28);
free(dest);

dest = ed(src, false, 7, 5,
3, 5, 7, 5, 3,
1, 3, 5, 3, 1);
printf("[2] ");
study(src, dest, 1.2, 0.001, .26, .76);
free(dest);

dest = ostromoukhov(src);
printf("[3] ");
study(src, dest, 1.2, 0.001, .0, .19);
free(dest);

dest = ed(src, true, 2911, 0,
0, 1373, 3457, 2258, 0,
0, 0, 0, 0, 0);
printf("[4] ");
study(src, dest, 1.2, 0.001, .0, .34);
}
break;


+ 11
- 4
2008-displacement/study-5.sh Zobrazit soubor

@@ -20,9 +20,16 @@ OUTPUT="$(echo "$1" | tr -d /).txt"
echo "$0: outputting to $OUTPUT"

touch "$OUTPUT"
find $1 -name '?????????????.???' | while read i; do
TMP="$(./main -5 $i)"
echo "$TMP" >> "$OUTPUT"
echo "$TMP"
find $1 -type f | while read i; do
J="$(basename "$i")"
if grep -q "$J" "$OUTPUT"; then
continue
fi
if TMP="$(./main -5 $i)"; then
echo "$TMP" >> "$OUTPUT"
echo "$TMP"
else
echo "@@@ FAILURE on $i @@@"
fi
done


Načítá se…
Zrušit
Uložit