ExRandom  3.0
exrandom::rand_table Class Reference

a wrapper to table_gen to make it look like a rand_digit. More...

#include <exrandom/rand_table.hpp>

Public Member Functions

 rand_table ()
 
template<typename Generator >
uint_t operator() (Generator &g)
 
long long count () const
 

Static Public Member Functions

template<typename RealType >
static RealType invrealbase ()
 

Static Public Attributes

static const uint_t base
 
static const uint_t min_value
 
static const uint_t max_value
 
static const int bits
 
static const bool power_of_two
 

Detailed Description

a wrapper to table_gen to make it look like a rand_digit.

Examples
tabulate_normals.cpp.

Definition at line 20 of file rand_table.hpp.

Constructor & Destructor Documentation

◆ rand_table()

exrandom::rand_table::rand_table ( )
inline

The constructor (which initializes the count to 0).

Definition at line 45 of file rand_table.hpp.

Member Function Documentation

◆ operator()()

template<typename Generator >
uint_t exrandom::rand_table::operator() ( Generator &  g)
inline
Template Parameters
Generatorthe type of g.
Parameters
gthe random generator engine.
Returns
the random digit.

Definition at line 52 of file rand_table.hpp.

◆ count()

long long exrandom::rand_table::count ( ) const
inline
Returns
the count.
Examples
tabulate_normals.cpp.

Definition at line 57 of file rand_table.hpp.

◆ invrealbase()

template<typename RealType >
static RealType exrandom::rand_table::invrealbase ( )
inlinestatic
Template Parameters
thefloating point type of the result.
Returns
1/base as a floating point number.

Definition at line 63 of file rand_table.hpp.

Member Data Documentation

◆ base

const uint_t exrandom::rand_table::base
static

The base for the digits, 10.

Definition at line 25 of file rand_table.hpp.

◆ min_value

const uint_t exrandom::rand_table::min_value
static

The minimum value produced by operator().

Definition at line 29 of file rand_table.hpp.

◆ max_value

const uint_t exrandom::rand_table::max_value
static

The maximum value produced by operator().

Definition at line 33 of file rand_table.hpp.

◆ bits

const int exrandom::rand_table::bits
static

The number of bits needed to represent a digit.

Definition at line 37 of file rand_table.hpp.

◆ power_of_two

const bool exrandom::rand_table::power_of_two
static

Is the base a power of two?

Definition at line 41 of file rand_table.hpp.


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