Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIGEL_Tools::SIG_Randomizer Class Reference

This randomizer creates random numbers, which are used for the genetic programming. More...

#include <SIG_Randomizer.h>

List of all members.

Public Methods

 SIG_Randomizer ()
 This randomizer creates random numbers, which are used for the genetic programming. More...

 SIG_Randomizer (int seed)
 This constructor initializes the generator with seed. More...

 ~SIG_Randomizer ()
int getRandomInt (int maximum)
 This operation returns a randomly generated integer number between 0 and maximum. More...

long getRandomLong (long maximum)
 This operation returns a randomly generated long integer number between 0 and maximum. More...

void setNewSeed (int seed)
 Sets a new seed. More...


Private Attributes

unsigned long int next


Detailed Description

This randomizer creates random numbers, which are used for the genetic programming.

Definition at line 12 of file SIG_Randomizer.h.


Constructor & Destructor Documentation

SIGEL_Tools::SIG_Randomizer::SIG_Randomizer ( )
 

This randomizer creates random numbers, which are used for the genetic programming.

Definition at line 5 of file SIG_Randomizer.cpp.

SIGEL_Tools::SIG_Randomizer::SIG_Randomizer ( int seed )
 

This constructor initializes the generator with seed.

Definition at line 11 of file SIG_Randomizer.cpp.

SIGEL_Tools::SIG_Randomizer::~SIG_Randomizer ( )
 

Definition at line 28 of file SIG_Randomizer.cpp.


Member Function Documentation

int SIGEL_Tools::SIG_Randomizer::getRandomInt ( int maximum )
 

This operation returns a randomly generated integer number between 0 and maximum.

Parameters:
maximum   maximum defines the maximum range of the generated numbers.

Definition at line 31 of file SIG_Randomizer.cpp.

Referenced by SIGEL_GP::SIG_GPManager::createTours(), SIGEL_GP::SIG_GPOperations::crossOver(), SIGEL_Program::SIG_Program::generateRandomProgram(), getRandomLong(), SIGEL_GP::SIG_GPOperations::mutation(), and SIGEL_Program::SIG_ProgramLine::randomRobotinstruction().

long SIGEL_Tools::SIG_Randomizer::getRandomLong ( long maximum )
 

This operation returns a randomly generated long integer number between 0 and maximum.

Parameters:
maximum   maximum defines the maximum range of the generated numbers.

Definition at line 42 of file SIG_Randomizer.cpp.

Referenced by SIGEL_GP::SIG_GPOperations::crossOver(), SIGEL_GP::SIG_GPOperations::mutation(), and SIGEL_Program::SIG_ProgramLine::randomRobotinstruction().

void SIGEL_Tools::SIG_Randomizer::setNewSeed ( int seed )
 

Sets a new seed.

The randomizer will be reinitialized."

Postcondition:
The randomizer is reinitialized due to the new seed."

Definition at line 17 of file SIG_Randomizer.cpp.

Referenced by SIG_Randomizer().


Member Data Documentation

unsigned long int SIGEL_Tools::SIG_Randomizer::next [private]
 

Definition at line 65 of file SIG_Randomizer.h.


The documentation for this class was generated from the following files:
Generated at Mon Sep 3 01:32:53 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000