Scopira 20080306

scopira::tool::sysrandom_gen Class Reference

#include <random.h>

List of all members.

Public Types

typedef long int result_type

Public Member Functions

 sysrandom_gen (unsigned int seed0=1)
 ctor
result_type min (void) const
 min val
result_type max (void) const
 max val
result_type next (void)
result_type operator() (void)
result_type operator() (result_type mx)

Static Public Member Functions

static void seed (unsigned int seed0)
 seed the generator

Static Public Attributes

static const bool has_fixed_range = true
static const int min_value = 0
static const int max_value = RAND_MAX

Detailed Description

a global-state random generato that uses the C libraries srand and rand calls. the follow the boost form

Author:
Aleksander Demko

Member Function Documentation

result_type scopira::tool::sysrandom_gen::operator() ( void  ) [inline]

Gets the next number in the sequence.

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

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

Author:
Aleksander Demko

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