RTP Audio System  2.0.0
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 Randomizer::random ( ) [inline]

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

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

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

Returns:
The generated number.
double 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.
card8 Randomizer::random8 ( ) [inline]

Get 8-bit random number.

Returns:
The generated number.

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

void 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