RNG Class Reference

Abstract class for random number generators. More...

#include <RNG.h>

Inheritance diagram for RNG::

LCG PM_LCG List of all members.

Public Methods

virtual unsigned long asLong ()=0
 Return a long in 0 ... LONG_MAX.

virtual void reset ()=0
 Reset the number generator to prepare it for use.

virtual float asFloat ()
 Return float in [0,1[.

virtual double asDouble ()
 Return double in [0,1[.

virtual int write (std::ostream &output) const=0
 Write the rng state to an output stream.

virtual int read (std::istream &input)=0
 Read an rng state from an input stream.


Friends

UTILIB_API std::ostream & operator<< (std::ostream &output, const RNG &rng)
UTILIB_API std::istream & operator>> (std::istream &input, RNG &rng)

Detailed Description

Abstract class for random number generators.

Adapted from GNU class by Dirk Grunwald.


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