Go to the previous, next section.

CNTausG -- Tausworth RNG

SYNOPSIS

#include <CNCL/TausG.h>

TYPE

CN_TAUSG

BASE CLASSES

CNRNG

DERIVED CLASSES

None

RELATED CLASSES

CNRandom

DESCRIPTION

CNTausG is a Tausworth random number generator class.

This generator is a special form of the Fibonacci generator. The period length is reduced, but the mathematical formula is easier. It even can be implemented as a hardware shift register. Binomial Distribution Constructors:

CNTausG();
CNTausG(CNParam *param);
Initializes CNTausG.

In addition to the member functions required by CNCL, CNTausG provides:

virtual unsigned long as_long32();
Draws a random number. The result is an unsigned integer in the range 0 ... 2^32-1.

virtual bool has_long32();
Returns TRUE because CNTausG is able to produce 32bit integer values.

virtual void reset();
Resets the CNTausG to its initial state.

Go to the previous, next section.