GRASS GIS 8 Programmer's Manual 8.2.1RC1(2022)-exported
kse.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
7double *Cdhc_kolmogorov_smirnov_exp(double *x, int n)
8{
9 static double y[2];
10 double *d, sqrtn;
11
12 d = Cdhc_dmax_exp(x, n);
13 sqrtn = sqrt((double)n);
14
15 y[1] = (d[0] > d[1]) ? d[0] : d[1];
16 y[0] = (y[1] - 0.2 / n) * (sqrtn + 0.5 / sqrtn + 0.26);
17
18#ifdef NOISY
19 fprintf(stdout, " TEST17 KSD(E) =%10.4f\n", y[0]);
20#endif /* NOISY */
21
22 return y;
23}
double * Cdhc_dmax_exp(double *x, int n)
Definition: dmaxe.c:7
double * Cdhc_kolmogorov_smirnov_exp(double *x, int n)
Definition: kse.c:7
#define x