Hi devs,
i have written a new raster3d module named r3.univar.
The code is mostly identical with r.univar from Hamish.
I have replaced the qsort with a heapsort function,
because qsort is in the worst case scenario quite slow on large datasets.
Maybe we can put heapsort as library functions into the
grass library, so r.univar and other modules can use them too?
Or is this function already present in grass?
I haven't looked at any of the code, but if as you say it is mostly identical to r.univar then perhaps it might be possible to compile r.univar and r3.univar from the same directory, as is done for r.mapcalc and r3.mapcalc? It would save cloning of code in the source distribution, make bugfixes easier - and an easy way for you to share that new function.
Just an idea,
Paul
On Sat, 17 Feb 2007, [ISO-8859-15] Sören Gebbert wrote:
Hi devs,
i have written a new raster3d module named r3.univar.
The code is mostly identical with r.univar from Hamish.
I have replaced the qsort with a heapsort function,
because qsort is in the worst case scenario quite slow on large datasets.
Maybe we can put heapsort as library functions into the
grass library, so r.univar and other modules can use them too?
Or is this function already present in grass?
Hi Paul,
i was thinking about this too, but for a fast functional prototype
i implemented it separately.
Merging is a good idea, i will do it.
Soeren
Paul Kelly schrieb:
I haven't looked at any of the code, but if as you say it is mostly identical to r.univar then perhaps it might be possible to compile r.univar and r3.univar from the same directory, as is done for r.mapcalc and r3.mapcalc? It would save cloning of code in the source distribution, make bugfixes easier - and an easy way for you to share that new function.
Just an idea,
Paul
On Sat, 17 Feb 2007, [ISO-8859-15] Sören Gebbert wrote:
Hi devs,
i have written a new raster3d module named r3.univar.
The code is mostly identical with r.univar from Hamish.
I have replaced the qsort with a heapsort function,
because qsort is in the worst case scenario quite slow on large datasets.
Maybe we can put heapsort as library functions into the
grass library, so r.univar and other modules can use them too?
Or is this function already present in grass?
Hi devs,
i have written a new raster3d module named r3.univar.
It is great to see the r3.* modules maturing well. Thanks!
I have replaced the qsort with a heapsort function,
because qsort is in the worst case scenario quite slow on large datasets.
Maybe we can put heapsort as library functions into the
grass library, so r.univar and other modules can use them too?
Or is this function already present in grass?