The argument x
should be entered as a matrix of bits of dimension \(B\)x\(k\), where \(k\) is the number of words (integers) generated by the RNG of interest.
The argument critical.value
should be calculated regarding the value of B
. For \(B = 8,...,16\), values of critical.value
are tabulated by Alcover et al. (2013) and calculation procedure of critical.value
for the values greater than 16 is described therein. The tabulated values can be used if the number of words (\(k\)) is equal to \(2^B\). Otherwise, it should be calculated over the given cumulative distribution function by Alcover et al. (2013). For example, if \(k=10^4\), then critical.value
\( = 9245\) and if \(k=2*10^4\), then critical.value
\( = 19999\).
Topological binary test is itself constitutes a goodness-of-fit test based on the number of
different B-bit patterns among the non-overlapping B-bit blocks composed of the input sequence of bits.