Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::test::DiagnosticRngEngine< Engine > Class Template Reference

Diagnostic wrapper that counts the number of calls to operator(). More...

#include <DiagnosticRngEngine.hh>

Public Types

Type aliases
using result_type = typename Engine::result_type
 
using size_type = std::size_t
 

Public Member Functions

template<class... Args>
 DiagnosticRngEngine (Args &&... args)
 Forward construction arguments to the original engine.
 
result_type operator() ()
 Get a random number and increment the sample counter.
 
size_type count () const
 Get the number of samples (DEPRECATED: use exchange_count)
 
void reset_count ()
 Reset the sample counter (DEPRECATED: use exchange_count)
 
size_type exchange_count ()
 Get and reset the counter.
 

Static Public Member Functions

static constexpr result_type min ()
 
static constexpr result_type max ()
 

Detailed Description

template<class Engine>
class celeritas::test::DiagnosticRngEngine< Engine >

Diagnostic wrapper that counts the number of calls to operator().

This wraps a low-level pseudorandom generator's call function. It can be used to determine the efficiency of rejection algorithms without changing any implementations.

Member Function Documentation

◆ max()

template<class Engine >
static constexpr result_type celeritas::test::DiagnosticRngEngine< Engine >::max ( )
inlinestaticconstexpr

Forwarded functions

◆ min()

template<class Engine >
static constexpr result_type celeritas::test::DiagnosticRngEngine< Engine >::min ( )
inlinestaticconstexpr

Forwarded functions


The documentation for this class was generated from the following file: