14 static int icmp(
const void *aa,
const void *bb)
22 static int fcmp(
const void *aa,
const void *bb)
34 static int dcmp(
const void *aa,
const void *bb)
46 int f_nmedian(
int argc,
const int *argt,
void **args)
56 for (i = 1; i <= argc; i++)
57 if (argt[i] != argt[0])
77 for (j = 0; j < argc; j++) {
88 qsort(a, n,
sizeof(
CELL), icmp);
93 *resc = (*resc + a1) / 2;
102 FCELL *res = args[0];
108 for (i = 0; i <
columns; i++) {
111 for (j = 0; j < argc; j++) {
122 qsort(a, n,
sizeof(
FCELL), fcmp);
127 *resc = (*resc + a1) / 2;
136 DCELL *res = args[0];
142 for (i = 0; i <
columns; i++) {
145 for (j = 0; j < argc; j++) {
156 qsort(a, n,
sizeof(
DCELL), dcmp);
161 *resc = (*resc + a1) / 2;
size_t Rast_cell_size(RASTER_MAP_TYPE)
Returns size of a raster cell in bytes.