ExRandom
3.0
|
Sample u-rands exactly from the unit uniform distribution. More...
#include <exrandom/unit_uniform_dist.hpp>
Public Member Functions | |
unit_uniform_dist (digit_gen &D) | |
template<typename Generator > | |
void | generate (Generator &, u_rand< digit_gen > &x) |
template<typename RealType , typename Generator > | |
RealType | value (Generator &g) |
digit_gen & | digit_generator () const |
Static Public Attributes | |
static const uint_t | base |
Sample u-rands exactly from the unit uniform distribution.
This samples from the unit uniform distribution P(x) = 1, for 0 < x < 1. This is a trivial call to the u_rand class.
digit_gen | the type of digit generator. |
This class allows a u-rand to be returned via the unit_uniform_dist::generate member function or a floating point result via the unit_uniform_dist::value<RealType> member function.
See unit_uniform_distribution for a simpler interface to sampling uniform deviates. (But, you can't obtain u-rands with this class and the constructor locks you into a specific floating point type.)
Definition at line 34 of file unit_uniform_dist.hpp.
|
inline |
The constructor.
D | a reference to the digit generator to be used. |
Definition at line 41 of file unit_uniform_dist.hpp.
|
inline |
Generate the next deviate as a u_rand.
Generator | the type of generator. |
[out] | x | the u_rand to set. |
Definition at line 50 of file unit_uniform_dist.hpp.
|
inline |
Generate the next deviate and round it to a floating point number.
RealType | the floating point type of the result. |
Generator | the type of g. |
g | the random generator engine. |
Definition at line 62 of file unit_uniform_dist.hpp.
|
inline |
Definition at line 70 of file unit_uniform_dist.hpp.
|
static |
The base of the digit generator
Definition at line 75 of file unit_uniform_dist.hpp.