GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
Loading...
Searching...
No Matches
c_stddev.c
Go to the documentation of this file.
1#include <math.h>
2
3#include <grass/gis.h>
4#include <grass/raster.h>
5#include <grass/stats.h>
6
7void c_stddev(DCELL *result, DCELL *values, int n, const void *closure)
8{
10
11 c_var(&var, values, n, closure);
12
14 Rast_set_d_null_value(result, 1);
15 else
16 *result = sqrt(var);
17}
18
19void w_stddev(DCELL *result, DCELL (*values)[2], int n, const void *closure)
20{
21 DCELL var;
22
23 w_var(&var, values, n, closure);
24
26 Rast_set_d_null_value(result, 1);
27 else
28 *result = sqrt(var);
29}
void Rast_set_d_null_value(DCELL *, int)
To set a number of DCELL raster values to NULL.
Definition null_val.c:153
#define Rast_is_d_null_value(dcellVal)
stat_func_w w_stddev
stat_func_w w_var
stat_func c_stddev
stat_func c_var
double DCELL
Definition gis.h:635
float var(IClass_statistics *statistics, int band1, int band2)
Helper function for computing variance.