14static void regression(
DCELL *result,
DCELL *values,
int n,
int which)
26 for (i = 0; i < n; i++) {
44 for (i = 0; i < n; i++)
46 numer += i * values[i];
50 for (i = 0; i < n; i++)
58 for (i = 0; i < n; i++)
60 denom2 += values[i] * values[i];
84 if (*result != *result)
108static void regression_w(
DCELL *result,
DCELL (*values)[2],
int n,
int which)
120 for (i = 0; i < n; i++) {
124 xsum += i * values[i][1];
125 ysum += values[i][0] * values[i][1];
126 count += values[i][1];
138 for (i = 0; i < n; i++)
140 numer += i * values[i][0] * values[i][1];
144 for (i = 0; i < n; i++)
152 for (i = 0; i < n; i++)
154 denom2 += values[i][0] * values[i][0] * values[i][1];
170 *result =
sqrt(
Rsq * (count - 2) / (1 -
Rsq));
178 if (*result != *result)
183 const void *closure
UNUSED)
189 const void *closure
UNUSED)
195 const void *closure
UNUSED)
201 const void *closure
UNUSED)
void Rast_set_d_null_value(DCELL *, int)
To set a number of DCELL raster values to NULL.
#define Rast_is_d_null_value(dcellVal)
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.