GRASS GIS 8 Programmer's Manual
8.3.2(2024)-exported
Loading...
Searching...
No Matches
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
double
*
Cdhc_kolmogorov_smirnov
(
double
*x,
int
n)
7
{
8
static
double
y[2];
9
double
*d, sqrtn;
10
11
sqrtn = sqrt((
double
)n);
12
d =
Cdhc_dmax
(
x
, n);
13
14
y[1] = (d[0] > d[1]) ? d[0] : d[1];
15
y[0] = y[1] * (sqrtn + 0.85 / sqrtn - 0.01);
16
17
#ifdef NOISY
18
fprintf(stdout,
" TEST10 KSD(N) =%10.4f\n"
, y[0]);
19
fprintf(stdout,
" TEST11 KSD =%10.4f\n"
, y[1]);
20
#endif
/* NOISY */
21
22
return
y;
23
}
Cdhc_dmax
double * Cdhc_dmax(double *x, int n)
Definition
dmax.c:6
Cdhc_kolmogorov_smirnov
double * Cdhc_kolmogorov_smirnov(double *x, int n)
Definition
ksn.c:6
x
#define x
cdhc
ksn.c
Generated on Fri May 24 2024 09:06:59 for GRASS GIS 8 Programmer's Manual by
1.9.8