Scopira 20080306

scopira::tool::sysdev_gen Class Reference

#include <random.h>

List of all members.

Public Types

typedef unsigned int result_type

Public Member Functions

 sysdev_gen (const std::string &token=default_token)
 ~sysdev_gen ()
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

Detailed Description

a class that connects to an os device to generate non-deterministic random numbers

Aleksander Demko

Constructor & Destructor Documentation

scopira::tool::sysdev_gen::sysdev_gen ( const std::string &  token = default_token) [explicit]

Constructor. By default, uses /dev/urandom under linux.

Aleksander Demko

Member Function Documentation

result_type scopira::tool::sysdev_gen::operator() ( void  )

Gets the next number in the sequence.

Aleksander Demko
result_type scopira::tool::sysdev_gen::operator() ( result_type  mx) [inline]

Gets the next number in the sequence. Capped by mx (that is, <mx). Not numerically sound (FIXME).

Aleksander Demko

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