Scopira
20080306
|
#include <random.h>
Public Types | |
typedef unsigned int | result_type |
Public Member Functions | |
sysdev_gen (const std::string &token=default_token) | |
~sysdev_gen () | |
dtor | |
result_type | min (void) const |
min val | |
result_type | max (void) const |
max val | |
result_type | operator() (void) |
result_type | operator() (result_type mx) |
Static Public Attributes | |
static const bool | has_fixed_range = true |
a class that connects to an os device to generate non-deterministic random numbers
|
explicit |
Constructor. By default, uses /dev/urandom under linux.
result_type scopira::tool::sysdev_gen::operator() | ( | void | ) |
Gets the next number in the sequence.
Referenced by max().
|
inline |
Gets the next number in the sequence. Capped by mx (that is, <mx). Not numerically sound (FIXME).