[GRASS-dev] r.univar -e
Martin Landa
landa.martin at gmail.com
Wed Sep 6 02:37:15 EDT 2006
Hamish,
2006/9/6, Hamish <hamish_nospam at yahoo.com>:
> I have merged your patch locally with a few minor changes:
> http://bambi.otago.ac.nz/hamish/grass/r.univar_ext.c
> or if you prefer,
> http://bambi.otago.ac.nz/hamish/grass/r.univar_ext.diff
>
> A few comments/questions before putting it in CVS:
>
> * It is quite a bit faster than r.univar.sh! (I guess this is to be
> expected, but it's always nice to see)
It should be:-)
> * qsort() comparison functions are declared as static int.
> a) shouldn't they just be int?
> b) could/should these fns be inlined for speed?
Not sure, ...
> * GRASS 5's s.cellstats uses something called qisort() instead of
> qsort(), which claims to be faster. Comments from the crowd?
> http://freegis.org/cgi-bin/viewcvs.cgi/grass/src/sites/s.cellstats/qisort.c?rev=HEAD&content-type=text/vnd.viewcvs-markup
Hm, I have simply tested
time r.univar elevation.10m -e 2>/dev/null| grep s$
real 0m0.817s
user 0m0.764s
sys 0m0.052s
time r.univar elevation.10m -e 2>/dev/null| grep s$
real 0m0.532s
user 0m0.516s
sys 0m0.016s
Not sure, should be qisort function part of GRASS library?
> * Are there any issues with having shell variables (-g flag) which start
> with a number?
>
> * I've held off on reformatting the output. Your patch assumes that the
> font will be monospaced, while the new GUI(s) may prefer to use a
> proportional font.
>
> * fabsf() removed as it's non-POSIX. fabs() used instead.
>
> * Kept "Mean" instead of "Arithmetic mean". Sample, population,
> geometric means don't apply in this context, so keep it simple.
Agreed
>
>
> TODOs
> easy: mean of squares (if anyone needs this just ask & I'll put it in)
> harder: mode, skewness, kurtosis (begging required, file a wish)
Nice to know:-)
Best, Martin
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>
--
Martin Landa <landa.martin at gmail.com> * http://gama.fsv.cvut.cz/~landa *
More information about the grass-dev
mailing list