RTP Trace System  1.0
Coral::Randomizer Class Reference

Randomizer. More...

#include <randomizer.h>

List of all members.

Public Member Functions

 Randomizer ()
void setSeed ()
void setSeed (const cardinal seed)
card8 random8 ()
card16 random16 ()
card32 random32 ()
card64 random64 ()
double random ()
cardinal random (const cardinal a, const cardinal b)
double random (const double a, const double b)

Private Attributes

card32 Value

Detailed Description

Randomizer.

This class is an randomizer. The randomizer algorithm will calculate random numbers with seed given by system timer (microseconds since January 01, 1970) or given by a number.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation

Constructor. Seed will be initialized by system timer (microseconds since January 01, 1970).


Member Function Documentation

double Coral::Randomizer::random ( ) [inline]

Get double random number out of interval [0,1].

Returns:
The generated number.

Get double random cardinal number out of interval [a,b].

Returns:
The generated number.
double Coral::Randomizer::random ( const double  a,
const double  b 
)

Get double random double number out of interval [a,b].

Returns:
The generated number.

Get 16-bit random number.

Returns:
The generated number.

Get 32-bit random number.

Returns:
The generated number.

Get 64-bit random number.

Returns:
The generated number.

Get 8-bit random number.

Returns:
The generated number.

Set seed by system timer (microseconds since January 01, 1970).

void Coral::Randomizer::setSeed ( const cardinal  seed)

Set seed by given number.

Parameters:
seedSeed value.

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines