GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
Main Page
Related Pages
+
Data Structures
Data Structures
Class Hierarchy
+
Data Fields
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
x
y
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
r
s
t
u
v
w
y
z
+
Enumerations
a
c
d
e
h
l
m
n
o
p
r
s
t
v
y
+
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
c_minx.c
Go to the documentation of this file.
1
#include <
grass/gis.h
>
2
#include <
grass/raster.h
>
3
4
void
c_minx
(
DCELL
* result,
DCELL
* values,
int
n,
const
void
*closure)
5
{
6
DCELL
min
, minx;
7
int
i;
8
9
Rast_set_d_null_value
(&min, 1);
10
Rast_set_d_null_value
(&minx, 1);
11
12
for
(i = 0; i < n; i++) {
13
if
(
Rast_is_d_null_value
(&values[i]))
14
continue
;
15
16
if
(
Rast_is_d_null_value
(&min) || min > values[i]) {
17
min = values[i];
18
minx = i;
19
}
20
}
21
22
if
(
Rast_is_d_null_value
(&minx))
23
Rast_set_d_null_value
(result, 1);
24
else
25
*result = minx;
26
}
Rast_is_d_null_value
#define Rast_is_d_null_value(dcellVal)
Definition:
defs/raster.h:420
min
#define min(x, y)
Definition:
draw2.c:31
DCELL
double DCELL
Definition:
gis.h:603
c_minx
void c_minx(DCELL *result, DCELL *values, int n, const void *closure)
Definition:
c_minx.c:4
raster.h
gis.h
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:155
lib
stats
c_minx.c
Generated on Mon May 31 2021 05:21:28 for GRASS GIS 7 Programmer's Manual by
1.8.13