In file mydocsrc/iml_rand.h:

class fsultra : public unit_uniform_rv

This is the Swiss Army Knife approach to random number generators

Inheritance:

fsultra < unit_uniform_rv


Public Methods

fsultra (void)
The only constructor
virtual double sample (void)
Correctly overload the sample() function
virtual void seed (long Seed)
Correctly overload the seed() function

Public

Other blades on the Swiss Army Knife.
long i32bit (void)
Signed 32 bit number
long i31bit (void)
Unsigned 31 bit number
short i16bit (void)
Signed 16 bit number
short i15bit (void)
Unsigned 15 bit number
char i8bit (void)
Signed 8 bit number
char i7bit (void)
Unsigned 7 bit number
char i1bit (void)
Random binary number
float vni (void)
Random 32-bit floating point in the range -1 to 1
float uni (void)
Random 32-bit floating point in the range 0 to 1
double dvni (void)
Random 64-bit floating point in the range -1 to 1
double duni (void)
Random 64-bit floating point in the range 0 to 1

Inherited from unit_uniform_rv:


Documentation

This is the Swiss Army Knife approach to random number generators. Here is the Official Blurb, although I've adapted it to be a class in this library. Read the code for how this works; in brief, it mixes a congruential RNG with a shift-register RNG to produce the final output.

FSU - ULTRA	The greatest random number generator that ever was
or ever will be.  Way beyond Super-Duper.
(Just kidding, but we think its a good one.)

Authors:	Arif Zaman (arif@stat.fsu.edu) and
George Marsaglia (geo@stat.fsu.edu).

Date:		27 May 1992

Version:	1.05

Copyright:	To obtain permission to incorporate this program into
any commercial product, please contact the authors at
the e-mail address given above or at

Department of Statistics and
Supercomputer Computations Research Institute
Florida State University
Tallahassee, FL 32306.

See Also:	README		for a brief description
ULTRA.DOC	for a detailed description
virtual double sample(void)
Correctly overload the sample() function. The function must return a value in the range 0 to 1.

virtual void seed(long Seed)
Correctly overload the seed() function. We have to do a little extra here, because rinit() wants two seeds, each to be used differently. I just do a bit reversal on the first seed to create the second seed.

Other blades on the Swiss Army Knife.


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++