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
7
void
c_stddev
(
DCELL
*result,
DCELL
*values,
int
n,
const
void
*closure)
8
{
9
DCELL
var
;
10
11
c_var
(&
var
, values, n, closure);
12
13
if
(
Rast_is_d_null_value
(&
var
))
14
Rast_set_d_null_value
(result, 1);
15
else
16
*result =
sqrt
(
var
);
17
}
18
19
void
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
25
if
(
Rast_is_d_null_value
(&
var
))
26
Rast_set_d_null_value
(result, 1);
27
else
28
*result =
sqrt
(
var
);
29
}
AMI_STREAM
Definition
ami_stream.h:153
Rast_set_d_null_value
void Rast_set_d_null_value(DCELL *, int)
To set a number of DCELL raster values to NULL.
Definition
null_val.c:153
Rast_is_d_null_value
#define Rast_is_d_null_value(dcellVal)
Definition
defs/raster.h:417
w_stddev
stat_func_w w_stddev
w_var
stat_func_w w_var
c_stddev
stat_func c_stddev
c_var
stat_func c_var
gis.h
DCELL
double DCELL
Definition
gis.h:635
var
float var(IClass_statistics *statistics, int band1, int band2)
Helper function for computing variance.
Definition
iclass_statistics.c:404
raster.h
stats.h
lib
stats
c_stddev.c
Generated on Fri Apr 3 2026 06:59:56 for GRASS 8 Programmer's Manual by
1.9.8