MCKL
Monte Carlo Kernel Library
Public Member Functions | Static Public Member Functions | List of all members
mckl::TestU01 Class Reference

Perform TestU01 tests on different RNG and U01 types. More...

#include <mckl/random/testu01.hpp>

Public Member Functions

 TestU01 (const TestU01 &)=delete
 
bool empty () const
 Return true if the TestU01 generator is not set or released. More...
 
::unif01_Gen * gen () const
 Get the TestU01 generator. More...
 
template<typename Battery >
void operator() (Battery &&battery)
 Apply a battery that accepts a unif01_Gen pointer as input. More...
 
template<typename BatteryRepeat >
void operator() (BatteryRepeat &&battery_repeat, int n)
 Apply a battery that accepts a unif01_Gen pointer as the first input, and an array of type int that specifies that replication number. More...
 
template<typename BatteryRepeat , typename InputIter >
void operator() (BatteryRepeat &&battery_repeat, InputIter first, InputIter last, int n)
 Apply a battery that accepts a unif01_Gen pointer as the first input, and an array of type int that specifies that replication number. More...
 
TestU01operator= (const TestU01 &)=delete
 
void release ()
 Release the TestU01 generator. More...
 
template<typename RNGType , typename U01Type >
void reset (const std::string &name, bool parallel=false)
 Reset the TestU01 generator to specified RNG and distribution. More...
 
template<typename RNGType , typename U01Type , std::size_t N, std::size_t M>
void reset (const std::string &name, bool parallel=false)
 Reset the TestU01 generator to specified RNG and distribution. More...
 
void reset (const std::string &name, double(*u01)())
 Reset the TestU01 generator to specified distribution. More...
 

Static Public Member Functions

static TestU01instance ()
 

Detailed Description

Perform TestU01 tests on different RNG and U01 types.

Definition at line 48 of file testu01.hpp.

Constructor & Destructor Documentation

◆ TestU01()

mckl::TestU01::TestU01 ( const TestU01 )
delete

Member Function Documentation

◆ empty()

bool mckl::TestU01::empty ( ) const
inline

Return true if the TestU01 generator is not set or released.

Definition at line 62 of file testu01.hpp.

◆ gen()

::unif01_Gen* mckl::TestU01::gen ( ) const
inline

Get the TestU01 generator.

Definition at line 97 of file testu01.hpp.

◆ instance()

static TestU01& mckl::TestU01::instance ( )
inlinestatic

Definition at line 54 of file testu01.hpp.

◆ operator()() [1/3]

template<typename Battery >
void mckl::TestU01::operator() ( Battery &&  battery)
inline

Apply a battery that accepts a unif01_Gen pointer as input.

Definition at line 101 of file testu01.hpp.

◆ operator()() [2/3]

template<typename BatteryRepeat >
void mckl::TestU01::operator() ( BatteryRepeat &&  battery_repeat,
int  n 
)
inline

Apply a battery that accepts a unif01_Gen pointer as the first input, and an array of type int that specifies that replication number.

Each element in the array is set to n. This currently only work with bbattery_RepeatSmallCrush due to TestU01's internal limits of at most 200 p-values can be returned by a single battery.

Definition at line 115 of file testu01.hpp.

◆ operator()() [3/3]

template<typename BatteryRepeat , typename InputIter >
void mckl::TestU01::operator() ( BatteryRepeat &&  battery_repeat,
InputIter  first,
InputIter  last,
int  n 
)
inline

Apply a battery that accepts a unif01_Gen pointer as the first input, and an array of type int that specifies that replication number.

The range [first, last) contains enumeration numbers of tests to be repeated. Each will be repeated n times.

Definition at line 129 of file testu01.hpp.

◆ operator=()

TestU01& mckl::TestU01::operator= ( const TestU01 )
delete

◆ release()

void mckl::TestU01::release ( )
inline

Release the TestU01 generator.

Definition at line 89 of file testu01.hpp.

◆ reset() [1/3]

template<typename RNGType , typename U01Type >
void mckl::TestU01::reset ( const std::string &  name,
bool  parallel = false 
)
inline

Reset the TestU01 generator to specified RNG and distribution.

Definition at line 66 of file testu01.hpp.

◆ reset() [2/3]

template<typename RNGType , typename U01Type , std::size_t N, std::size_t M>
void mckl::TestU01::reset ( const std::string &  name,
bool  parallel = false 
)
inline

Reset the TestU01 generator to specified RNG and distribution.

Definition at line 74 of file testu01.hpp.

◆ reset() [3/3]

void mckl::TestU01::reset ( const std::string &  name,
double(*)()  u01 
)
inline

Reset the TestU01 generator to specified distribution.

Definition at line 81 of file testu01.hpp.