libcoyotl - A Library of C++ Tools

Created by Scott Robert Ladd at Coyote Gulch Productions.


Public Member Functions | Static Public Attributes | Friends
libcoyotl::mtwister Class Reference
Inheritance diagram for libcoyotl::mtwister:
libcoyotl::prng

List of all members.

Public Member Functions

Static Public Attributes

Friends


Constructor & Destructor Documentation

libcoyotl::mtwister::mtwister ( )

The constructor initializes the prng seed from either the time or some stochastic source such as /dev/random or /dev/urandom.

libcoyotl::mtwister::mtwister ( uint32_t  seed)

The constructor uses an explicit value for the seed.

Parameters:
seed- Seed value used to "start" or seed the generator

Member Function Documentation

uint32_t libcoyotl::mtwister::get_rand ( ) [virtual]

Returns the next uint32_t in sequence.

Returns:
A pseudorandom uint32_t value

Implements libcoyotl::prng.

virtual void libcoyotl::mtwister::init ( uint32_t  seed) [virtual]

Resets the generator using the provided seed value.

Parameters:
seed- Seed value used to "start" or seed the generator

Reimplemented from libcoyotl::prng.


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

© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.