rngtest::RNGTestPrint class

RNGTestPrint : tk::RNGPrint.

Base classes

class tk::RNGPrint
RNGPrint : Print.

Constructors, destructors, conversion operators

RNGTestPrint(const std::string& screen, std::ostream& str = std::clog, std::ios_base::openmode mode = std::ios_base::out, std::ostream& qstr = std::cout) explicit

Public functions

template<class Option, typename... tags>
void Section() const
Print section only if differs from default.
template<class Option, typename... tags>
void Item() const
Print control option: 'group : option' only if differs from its default.
void battery(std::size_t ntest, std::size_t nstat) const
void names(const std::vector<std::string>& testnames) const
void statshead(const std::string& t, std::size_t npval, std::size_t ntest) const
void test(std::size_t ncomplete, std::size_t ntest, std::map<std::string, std::size_t>& nfail, const std::vector<std::vector<std::string>>& status) const
Print one-liner info for test.
template<class Failed>
void failed(const std::string& t, std::size_t npval, const std::vector<Failed>& nfail) const
Print failed statistical test names, RNGs, and p-values.
void cost(const std::string& name, const std::string& costnote, std::map<std::string, tk::real> c) const
void rank(const std::string& name, const std::string& ranknote, std::map<std::string, std::size_t> f) const

Function documentation

rngtest::RNGTestPrint::RNGTestPrint(const std::string& screen, std::ostream& str = std::clog, std::ios_base::openmode mode = std::ios_base::out, std::ostream& qstr = std::cout) explicit

Parameters
screen in Screen output filename
str in/out Verbose stream
mode in Open mode for screen output file, see http://en.cppreference.com/w/cpp/io/ios_base/openmode
qstr in/out Quiet stream

Constructor

void rngtest::RNGTestPrint::battery(std::size_t ntest, std::size_t nstat) const

Parameters
ntest in Number tests in battery
nstat in Number statistics in battery

Print battery only if differs from default

void rngtest::RNGTestPrint::names(const std::vector<std::string>& testnames) const

Parameters
testnames in Names of tests

Print statistical test name(s)

void rngtest::RNGTestPrint::statshead(const std::string& t, std::size_t npval, std::size_t ntest) const

Parameters
in String to use as title
npval in Number of p-values from tests
ntest in Number of tests

Print statistical tests header (with legend)

void rngtest::RNGTestPrint::test(std::size_t ncomplete, std::size_t ntest, std::map<std::string, std::size_t>& nfail, const std::vector<std::vector<std::string>>& status) const

Print one-liner info for test.

Parameters
ncomplete in Number of completed tests
ntest in Total number of tests
nfail in Number of failed tests for RNG
status in Vector of vector of string with the following assumed structure:

Columns: [done/total/failed]

  • done: number of tests completed so far (note that a test may produce more than one statistics and thus p-values)
  • total: total number of tests: number of tests in the suite times the number of RNGs tested (note that a test may produce more than one statistics and thus p-values)
  • failed: number of failed tests by a given RNG so far name of the statistical test name of RNG result of test: "pass" or "fail, p-value = ..."
  • status[0]: vector of name(s) of the test(s), length: number of p-values
  • status[1]: vector of p-value strings: "pass" or "fail, p-value = ...", length: number of p-values
  • status[2]: vector of length 1: RNG name used to run the test

template<class Failed>
void rngtest::RNGTestPrint::failed(const std::string& t, std::size_t npval, const std::vector<Failed>& nfail) const

Print failed statistical test names, RNGs, and p-values.

Parameters
in String to use as title
npval in Number of p-values from tests
nfail in Number of failed tests for RNG

Requirements on the template argument, class Failed: must have public fields test, rng, and pval.

void rngtest::RNGTestPrint::cost(const std::string& name, const std::string& costnote, std::map<std::string, tk::real> c) const

Parameters
name in Section name
costnote in A note on how to interpret the costs
in Costs for RNGs

Print RNGs and their measured run times

void rngtest::RNGTestPrint::rank(const std::string& name, const std::string& ranknote, std::map<std::string, std::size_t> f) const

Parameters
name in Section name
ranknote in A note on how to interpret ranks
in Ranks for RNGs

Print RNGs and their number of failed tests