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
▼
GRASS GIS 7 Programmer's Manual
Libraries
Core libraries
►
Further libraries
File structure of GRASS Location
►
Compiling and Installing GRASS Modules
Multiple-Architecture Conventions
►
Vector modules and their parameters/flags
►
GRASS Array Statistics Library
btree2 library
►
GRASS Cairo Display Driver
►
GRASS testing normality & exponentiality Library
►
GRASS Cluster analysis statistics Library
►
GRASS DataBase Management Interface
►
GRASS Display Library
►
CCMATH mathematics library source code
►
GRASS GIS General Library (aka GIS Library)
►
GRASS Numerical math interface
►
GRASS Partial differential equations Library (GPDE)
►
GRASS Imagery Library
►
GRASS Data Elements Manage Library
►
GRASS Nviz Library
►
GRASS GIS OGSF Library
GRASS GIS PNG Display Driver Library
►
GRASS and the PROJ projection library
GRASS Postscript Display Driver Library
►
GRASS Raster Library
►
GRASS 3D Raster Volume Library
GRASS Row Input/Output Library
GRASS Library for interpolation with regularized splines with tension
►
GRASS Segment Library
►
GRASS Directed Graph Library
►
GRASS Vector Library
Todo List
Deprecated List
Bug List
►
Data Structures
▼
Files
►
File List
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
c_divr.c
Go to the documentation of this file.
1
#include <
grass/gis.h
>
2
#include <
grass/stats.h
>
3
4
void
c_divr
(
DCELL
* result,
DCELL
* values,
int
n,
const
void
*closure)
5
{
6
int
count
;
7
DCELL
prev;
8
int
i;
9
10
/* sort the array of values, then count differences */
11
12
n =
sort_cell
(values, n);
13
14
if
(n == 0) {
15
*result = 0;
16
return
;
17
}
18
19
count = 1;
20
prev = values[0];
21
22
for
(i = 0; i < n; i++)
23
if
(values[i] != prev) {
24
prev = values[i];
25
count++;
26
}
27
28
*result = (
DCELL
) count;
29
}
sort_cell
int sort_cell(DCELL *, int)
Definition:
sort_cell.c:28
c_divr
void c_divr(DCELL *result, DCELL *values, int n, const void *closure)
Definition:
c_divr.c:4
DCELL
double DCELL
Definition:
gis.h:603
count
int count
stats.h
gis.h
lib
stats
c_divr.c
Generated on Mon May 31 2021 05:21:28 for GRASS GIS 7 Programmer's Manual by
1.8.13