/* nag_2_sample_ks_test (g08cdc) Example Program. * * Copyright 2000 Numerical Algorithms Group. * * Mark 6, 2000. * * Mark 8 revised, 2004 * */ #include #include #include #include #include int main (void) { Integer exit_status=0, i, igen = 0, init, iseed[] = {0, 0, 0, 0}, m, n, ntype; NagError fail; Nag_TestStatistics ntype_enum; double d, enda, endb, p, *x=0, *y=0, z; INIT_FAIL(fail); Vprintf("nag_2_sample_ks_test (g08cdc) Example Program Results\n"); /* Skip heading in data file */ Vscanf("%*[^\n]"); Vscanf("%ld %ld", &n, &m); if (!(x = NAG_ALLOC(n, double)) || !(y = NAG_ALLOC(m, double))) { Vprintf("Allocation failure\n"); exit_status = -1; goto END; } Vprintf("\n"); init = 0; /* nag_rngs_init_repeatable (g05kbc). * Initialize seeds of a given generator for random number * generating functions (that pass seeds explicitly) to give * a repeatable sequence */ nag_rngs_init_repeatable(&igen, iseed); enda = 0.0; endb = 2.0; for (i=0;i