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
extreme.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <math.h>
3
4
5
double
*
Cdhc_extreme
(
double
*
x
,
int
n)
6
{
7
int
i;
8
static
double
y[2];
9
double
min
,
max
, sum1 = 0.;
10
11
min = max = x[0];
12
for
(i = 0; i < n; ++i) {
13
sum1 += x[i];
14
if
(min > x[i])
15
min = x[i];
16
17
if
(max < x[i])
18
max = x[i];
19
}
20
sum1 /= n;
21
22
y[0] = max - sum1;
23
y[1] = min - sum1;
24
25
#ifdef NOISY
26
fprintf(stdout,
" TEST3 U(N) =%10.4f U(1) =%10.4f\n"
, y[0], y[1]);
27
#endif
/* NOISY */
28
29
return
y;
30
}
min
#define min(x, y)
Definition:
draw2.c:31
x
#define x
max
#define max(x, y)
Definition:
draw2.c:32
Cdhc_extreme
double * Cdhc_extreme(double *x, int n)
Definition:
extreme.c:5
lib
cdhc
extreme.c
Generated on Mon May 31 2021 05:21:29 for GRASS GIS 7 Programmer's Manual by
1.8.13