vcg::math::RandomGenerator Class Reference

#include <random_generator.h>

Inheritance diagram for vcg::math::RandomGenerator:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual unsigned int generate (unsigned int limit)=0
 Return a random number in the given range (note that not all the RNG can handle a given limit).
virtual double generate01 ()=0
 Return a random number in the [0,1) real interval.
virtual double generate01closed ()=0
 Returns a random number in the [0,1] real interval.
virtual double generate01open ()=0
 Generates a random number in the (0,1) real interval.
virtual void initialize (unsigned int seed)=0
 (Re-)initialize with a given seed.
 RandomGenerator ()
virtual ~RandomGenerator ()

Detailed Description

Common interface for random generation (with uniform distribution).

Two RNGs are available: Subtractive Ring and an improved Marsenne-Twister.

Definition at line 37 of file random_generator.h.


Constructor & Destructor Documentation

vcg::math::RandomGenerator::RandomGenerator (  )  [inline]

Definition at line 43 of file random_generator.h.

virtual vcg::math::RandomGenerator::~RandomGenerator (  )  [inline, virtual]

Definition at line 45 of file random_generator.h.


Member Function Documentation

virtual unsigned int vcg::math::RandomGenerator::generate ( unsigned int  limit  )  [pure virtual]

Return a random number in the given range (note that not all the RNG can handle a given limit).

Implemented in vcg::math::SubtractiveRingRNG, and vcg::math::MarsenneTwisterRNG.

virtual double vcg::math::RandomGenerator::generate01 (  )  [pure virtual]

Return a random number in the [0,1) real interval.

Implemented in vcg::math::SubtractiveRingRNG, and vcg::math::MarsenneTwisterRNG.

virtual double vcg::math::RandomGenerator::generate01closed (  )  [pure virtual]

Returns a random number in the [0,1] real interval.

Implemented in vcg::math::SubtractiveRingRNG, and vcg::math::MarsenneTwisterRNG.

virtual double vcg::math::RandomGenerator::generate01open (  )  [pure virtual]

Generates a random number in the (0,1) real interval.

Implemented in vcg::math::SubtractiveRingRNG, and vcg::math::MarsenneTwisterRNG.

virtual void vcg::math::RandomGenerator::initialize ( unsigned int  seed  )  [pure virtual]

(Re-)initialize with a given seed.

Implemented in vcg::math::SubtractiveRingRNG, and vcg::math::MarsenneTwisterRNG.


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


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:23:25 2013