GRASS GIS 7 Programmer's Manual
7.8.4(2020)-exported
ksn.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <math.h>
3
#include <grass/cdhc.h>
4
#include "local_proto.h"
5
6
7
double
*
Cdhc_kolmogorov_smirnov
(
double
*
x
,
int
n)
8
{
9
static
double
y[2];
10
double
*d, sqrtn;
11
12
sqrtn = sqrt((
double
)n);
13
d =
Cdhc_dmax
(
x
, n);
14
15
y[1] = (d[0] > d[1]) ? d[0] : d[1];
16
y[0] = y[1] * (sqrtn + 0.85 / sqrtn - 0.01);
17
18
#ifdef NOISY
19
fprintf(stdout,
" TEST10 KSD(N) =%10.4f\n"
, y[0]);
20
fprintf(stdout,
" TEST11 KSD =%10.4f\n"
, y[1]);
21
#endif
/* NOISY */
22
23
return
y;
24
}
x
#define x
Cdhc_kolmogorov_smirnov
double * Cdhc_kolmogorov_smirnov(double *x, int n)
Definition:
ksn.c:7
Cdhc_dmax
double * Cdhc_dmax(double *x, int n)
Definition:
dmax.c:7
cdhc
ksn.c
Generated on Mon Oct 5 2020 08:56:03 for GRASS GIS 7 Programmer's Manual by
1.8.18