Older Newer
Sat, 14 Jul 2007 20:24:06 . . . . (Martin Koch)?

Changes by last author:

= FunctionName =

== Syntax ==

:int quickMedian(int low, int high)

== Arguments ==


:: lowest put/get cell that contains values, usually zero.


:: highest put/get cell that contains values, usually calculated as (radius*2+1) * (radius*2+1)

== Return ==

: The return value is the median value.

== Description ==


== Example ==



ctl(7): "Radius ", range=(1,15), val=1, page=1



for (y=y_start; y<y_end; y++)

for (x=x_start; x<x_end; x++)

for (z=0; z<3; z++)





return true;



== Also see ==


== Comments ==

:Please notice that quickMedian() works fast for radius values from 1 to 8, but above that it gets very slow. There are much faster algorithms that use tables or histogram for calculating median values with a high radius. There are also slightly faster algorithms for medians with a radius of 1 or 2.

:Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.