3 local f
, s
, e
, d
, c
= ...
5 if f
=='-h' or f
=='--help' then
7 usage: ]]..arg
[0]..[[ <f> <s> <e> <d> <c>
8 <f> file on which to compute
9 <s> (default 10) starting value of alpha
10 <e> (default 500) final value of alpha
11 <d> (default 10) stepping value of alpha
12 <c> (default 3.7) correction value
22 local digits
= #tostring(s
)
23 if digits
< #tostring(e
) then
27 s
, e
, d
, c
= tonumber(s
), tonumber(e
), tonumber(d
), tonumber(c
)
30 l
= string.format('%.'..tostring(digits
)..'i', l
)
31 print('==== length = '..l
..' ====')
32 os
.execute('time ./compute_weights '..f
..' -l '..l
..' -c '..c
)