44
44
# Read the csf files with a list of country codes, and languages codes
45
45
while IFS="," read ctry lang ; do
46
46
INSTANCE="instances/$lang-$1-$2.dat"
47
- echo -ctry $ctry -lang $lang $1 $2 > $INSTANCE
47
+ echo -- ctry $ctry - -lang $lang $1 $2 > $INSTANCE
48
48
done < <(grep -v "^#\|^$" $LANGUAGES)
49
49
}
50
50
#+END_SRC
@@ -77,17 +77,13 @@ exit $?
77
77
78
78
*** Best algorithm
79
79
#+BEGIN_SRC sh
80
- echo -v normal -d TRUE -lightM FALSE -lightP FALSE > algorithms/FF .dat
80
+ echo -v normal --dry-run > algorithms/HEAVY .dat
81
81
#+END_SRC
82
82
83
83
*** All algorithms
84
84
85
85
#+BEGIN_SRC sh
86
- echo -v normal -d TRUE -lightM FALSE -lightP FALSE > algorithms/FF.dat
87
- echo -v normal -d TRUE -lightM FALSE -lightP TRUE > algorithms/FT.dat
88
- echo -v normal -d TRUE -lightM TRUE -lightP FALSE -newHeavyP FALSE > algorithms/TF.dat
89
- echo -v normal -d TRUE -lightM TRUE -lightP FALSE -newHeavyP TRUE > algorithms/TF_NEW.dat
90
- echo -v normal -d TRUE -lightM TRUE -lightP TRUE > algorithms/TT.dat
86
+ echo -v normal --dry-run --light > algorithms/LIGHT.dat
91
87
#+END_SRC
92
88
93
89
@@ -139,7 +135,7 @@ The word lists ~colors.txt~ and ~monsters.txt~ takes the most time by far (aroun
139
135
140
136
#+BEGIN_SRC sh
141
137
function generateLong() {
142
- echo -minop $1 -maxop $1 words/$2 > instances/`basename -s .txt $2`-$1.dat
138
+ echo --min $1 --max $1 words/$2 > instances/`basename -s .txt $2`-$1.dat
143
139
}
144
140
145
141
# generateLong 9 9 monsters.txt
@@ -169,7 +165,7 @@ The word lists ~colors.txt~ and ~monsters.txt~ takes the most time by far (aroun
169
165
function generateMaxLong() {
170
166
find samples/ -type f -print | while read PATHNAME ; do
171
167
INSTANCE="instances/"`basename -s .txt $PATHNAME`-$1-$2.dat
172
- echo -minop $1 -maxop $2 $PATHNAME > $INSTANCE
168
+ echo --min $1 --max $2 $PATHNAME > $INSTANCE
173
169
done
174
170
}
175
171
@@ -218,7 +214,7 @@ The word lists ~colors.txt~ and ~monsters.txt~ takes the most time by far (aroun
218
214
function generateCrossword() {
219
215
find samples/ -type f -print | while read PATHNAME ; do
220
216
INSTANCE="instances/"`basename -s .txt $PATHNAME`-$1.dat
221
- echo -grid $1 $PATHNAME > $INSTANCE
217
+ echo --generate CROSS --cross $1 $PATHNAME > $INSTANCE
222
218
done
223
219
}
224
220
@@ -230,18 +226,18 @@ The word lists ~colors.txt~ and ~monsters.txt~ takes the most time by far (aroun
230
226
231
227
*** Addition
232
228
#+BEGIN_SRC sh
233
- echo -v quiet -d FALSE -l TRUE -lightM FALSE -lightP FALSE > algorithms/ALL.dat
229
+ echo -v quiet --generate ADD -s BIGNUM > algorithms/ALL.dat
234
230
#+END_SRC
235
231
236
232
237
233
*** Multiplication
238
234
#+BEGIN_SRC sh
239
- echo -v quiet -d FALSE -mult TRUE -multUnique TRUE -lightP FALSE > algorithms/ALL.dat
235
+ echo -v quiet --generate MUL --right UNIQUE > algorithms/ALL.dat
240
236
#+END_SRC
241
237
242
238
*** Long Multiplication
243
239
#+BEGIN_SRC sh
244
- echo -v quiet -d FALSE -longMult TRUE -lightM FALSE -lightP FALSE > algorithms/ALL.dat
240
+ echo -v quiet --generate LMUL > algorithms/ALL.dat
245
241
#+END_SRC
246
242
247
243
* Solve
@@ -301,14 +297,10 @@ Do not remove the content of the directory!
301
297
** Configure the algorithm
302
298
303
299
#+BEGIN_SRC sh
304
- ARGS=" -v verbose -t 100"
305
- echo $ARGS -l TRUE > algorithms/BIGNUM.dat
306
- echo $ARGS -l FALSE -h FALSE > algorithms/SCALAR.dat
307
- echo $ARGS -l FALSE -h TRUE > algorithms/HORNER.dat
308
-
309
- # echo $ARGS -l TRUE -search 1 > algorithms/BIGNUM-1.dat
310
- # echo $ARGS -l FALSE -h FALSE -search 1 > algorithms/SCALAR-1.dat
311
- # echo $ARGS -l FALSE -h TRUE -search 1 > algorithms/HORNER-1.dat
300
+ ARGS=" -v verbose"
301
+ echo $ARGS -s BIGNUM > algorithms/BIGNUM.dat
302
+ echo $ARGS -s SCALAR > algorithms/SCALAR.dat
303
+ echo $ARGS -s SCALAR --horner > algorithms/HORNER.dat
312
304
#+END_SRC
313
305
314
306
0 commit comments