GRASS GIS 8 Programmer's Manual
8.5.0dev(2025)-565e82de51
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
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
Enumerations
a
c
d
e
h
i
j
l
m
n
o
p
r
s
t
v
y
Enumerator
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
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
extreme.c
Go to the documentation of this file.
1
#include <
stdio.h
>
2
#include <math.h>
3
4
double
*
Cdhc_extreme
(
double
*
x
,
int
n)
5
{
6
int
i;
7
static
double
y[2];
8
double
min
,
max
, sum1 = 0.;
9
10
min
=
max
=
x
[0];
11
for
(i = 0; i < n; ++i) {
12
sum1 +=
x
[i];
13
if
(
min
>
x
[i])
14
min
=
x
[i];
15
16
if
(
max
<
x
[i])
17
max
=
x
[i];
18
}
19
sum1 /= n;
20
21
y[0] =
max
- sum1;
22
y[1] =
min
- sum1;
23
24
#ifdef NOISY
25
fprintf(stdout,
" TEST3 U(N) =%10.4f U(1) =%10.4f\n"
, y[0], y[1]);
26
#endif
/* NOISY */
27
28
return
y;
29
}
min
#define min(x, y)
Definition:
draw2.c:29
max
#define max(x, y)
Definition:
draw2.c:30
Cdhc_extreme
double * Cdhc_extreme(double *x, int n)
Definition:
extreme.c:4
stdio.h
x
#define x
lib
cdhc
extreme.c
Generated on Thu Mar 20 2025 07:33:24 for GRASS GIS 8 Programmer's Manual by
1.9.1