[GRASS5] statistics library?

Markus Neteler neteler at itc.it
Tue Sep 9 03:35:52 EDT 2003


On Tue, Sep 09, 2003 at 02:53:52PM +1200, Hamish wrote:
> Hi all,
> 
> I was looking to modify r.series to add an option for x% trimmed mean,
> and it occured to me that I'd probably want the same for r.statistics.
> 
> Looking further, s.univar, s.windavg, s.cellstats, r.series,
> r.statistics, and probably others all impliment their own mix of
> statistical queries, some with more options, some with less.
> 
> Wouldn't it be better to have a standard (simple) stats library in
> src/libes/gmath/ which worked on an unsorted array of floats?

Definitely! The statistics routines should be in once library (gmath).

> Is there something in R or somewhere else that could be reused? Would
> that just lead to dependancy vs. sync-ing headaches, and be overkill
> anyway? Start off with univar.c?

There should be no external dependencies to get the current modules
running. Or did you mean to take over code from R (as being GPLed it
should be ok)?
 
> What started me on this was to trying to filter out bad data points from
> a r.sun output map; probably better dealt with by setting a smaller
> dist= value or fixing the bug if it is a bug..
> 
> ?
> 
> Hamish

The idea of "gmath" was to maintain all stats functions in this
place, unfortunately it's far from being done yet.
There is also potential code from libgis to be migrated there
(lu.c, svd.c, ...).

Markus




More information about the grass-dev mailing list