/usr/include/dieharder/diehard_runs.h is in libdieharder-dev 3.31.1-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | /*
* diehard_runs test header.
*/
/*
* function prototype
*/
int diehard_runs(Test **test,int irun);
static Dtest diehard_runs_dtest __attribute__((unused)) = {
"Diehard Runs Test",
"diehard_runs",
"\
#==================================================================\n\
# Diehard Runs Test\n\
# This is the RUNS test. It counts runs up, and runs down, \n\
# in a sequence of uniform [0,1) variables, obtained by float- \n\
# ing the 32-bit integers in the specified file. This example \n\
# shows how runs are counted: .123,.357,.789,.425,.224,.416,.95\n\
# contains an up-run of length 3, a down-run of length 2 and an \n\
# up-run of (at least) 2, depending on the next values. The \n\
# covariance matrices for the runs-up and runs-down are well \n\
# known, leading to chisquare tests for quadratic forms in the \n\
# weak inverses of the covariance matrices. Runs are counted \n\
# for sequences of length 10,000. This is done ten times. Then \n\
# repeated. \n\
#\n\
# In Dieharder sequences of length tsamples = 100000 are used by\n\
# default, and 100 p-values thus generated are used in a final\n\
# KS test.\n\
#==================================================================\n",
100, /* Default psamples */
100000, /* Default tsamples */
2, /* runs returns two pvalues, not just one */
diehard_runs,
0
};
|