Go to the first, previous, next, last section, table of contents.


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 based on a paper by Tausworthe [12]. The generator, which is related to cryptographic methods, operates directly with bits to form random numbers. For further reading see [7] and [13]. A version of the Tausworthe generator was also studied by Richter [11]. The implementation of the Tausworthe Generator of the CNCL works with a fixed seed. Nevertheless the constructor accepts a seed. The effect is, that the first random numbers are thrown away as long as the quantity of numbers drawn is less than the seed. The main advantage of this generator is that it can easily be implemented as a fast hardware generator. Statistical tests [11] have shown some flaws of this generator so that its use is not recommended.

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 first, previous, next, last section, table of contents.