1 /* 2 * This is an example header file for a test. For existing tests these 3 * headers are in the library includes already, but this one is an example 4 * suitable for use as a template. 5 */ 6 7 /* 8 * The function needs a prototype. In order to use the standard test 9 * creation/destruction/execution routines, the prototype should have 10 * precisely this form. 11 */ 12 int rgb_lagged_sums(Test **test,int irun); 13 14 /* 15 * This is default data for the test at hand. The first field is 16 * the test name. The second is the test description. The third 17 * is the default number of p-values generated by a run for display 18 * in a histogram and to generate a cumulative test p-value using 19 * Kuiper-Kolmogorov-Smirnov. The fourth is the number of "samples" 20 * accumulated per test, if relevant (some tests do not permit this 21 * to be varied). The fifth and final Dtest parameter is the number 22 * of statistics generated by the test (per test invocation) -- usually 23 * this will be one but for several it is two and could be more. 24 */ 25 static Dtest rgb_lagged_sums_dtest __attribute__((unused)) = { 26 "RGB Lagged Sum Test", 27 "rgb_lagged_sum", 28 "\ 29 #==================================================================\n\ 30 # RGB Lagged Sums Test\n\ 31 # This package contains many very lovely tests. Very few of them,\n\ 32 # however, test for lagged correlations -- the possibility that\n\ 33 # the random number generator has a bitlevel correlation after\n\ 34 # some fixed number of intervening bits.\n\ 35 #\n\ 36 # The lagged sums test is therefore very simple. One simply adds up\n\ 37 # uniform deviates sampled from the rng, skipping lag samples in between\n\ 38 # each rand used. The mean of tsamples samples thus summed should be\n\ 39 # 0.5*tsamples. The standard deviation should be sqrt(tsamples/12).\n\ 40 # The experimental values of the sum are thus converted into a\n\ 41 # p-value (using the erf()) and a ks-test applied to psamples of them.\n\ 42 #==================================================================\n", 43 100, 44 1000000, 45 1, 46 rgb_lagged_sums, 47 0 48 }; 49 50