GRASS Programmer's Manual  6.4.2(2012)
c-drive.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <grass/cdhc.h>
00004 
00005 
00006 int main(int argc, char **argv)
00007 {
00008     double x[1000];
00009     double *y;
00010     int n = 0;
00011 
00012     while (scanf("%lf", &x[n++]) != EOF) ;
00013     n--;
00014 
00015     fprintf(stdout, "N=%d\n", n);
00016     fprintf(stdout, "*y=%ld\n", y);
00017     y = omnibus_moments(x, n);
00018     fprintf(stdout, "*y=%ld\n", y);
00019     y = geary_test(x, n);
00020     fprintf(stdout, "*y=%ld\n", y);
00021     y = dagostino_d(x, n);
00022     fprintf(stdout, "y=%g\n", y[1]);
00023     y = kuipers_v(x, n);
00024     y = watson_u2(x, n);
00025     y = durbins_exact(x, n);
00026     y = anderson_darling(x, n);
00027     y = cramer_von_mises(x, n);
00028 
00029     /* for ks and lillefors, the discrepancy seems to come
00030        in in computing the sum of x*x */
00031 
00032     y = kolmogorov_smirnov(x, n);
00033     y = chi_square(x, n);
00034     y = shapiro_wilk(x, n);
00035     y = shapiro_francia(x, n);
00036     y = shapiro_wilk_exp(x, n);
00037     y = cramer_von_mises_exp(x, n);
00038     y = kolmogorov_smirnov_exp(x, n);
00039     y = kuipers_v_exp(x, n);
00040     y = watson_u2_exp(x, n);
00041     y = anderson_darling_exp(x, n);
00042     y = chi_square_exp(x, n);
00043     y = mod_maxlik_ratio(x, n);
00044     y = coeff_variation(x, n);
00045     y = kotz_families(x, n);
00046 
00047     return EXIT_SUCCESS;
00048 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines