#include <Random.h>
Inheritance diagram for genetiK::util::Random:
Public Member Functions | |
virtual unsigned int | getNextInt ()=0 |
Returns the next pseudorandom integer. | |
virtual unsigned int | getNextInt (unsigned int max)=0 |
Returns the next pseudorandom integer. | |
virtual double | getNextReal ()=0 |
Returns the next pseudorandom integer. | |
Static Public Member Functions | |
static void | setImplementation (Random *random) |
sets an implementation of the Random. | |
static void | setDefaultImplementation () |
sets the default implementation of the Random. | |
static Random * | getImplementation () |
returns the current implementation of the random. | |
static void | deleteImplementation () |
destroy the current implementation. | |
Protected Member Functions | |
Random () | |
creates the default Random implementation. |
This class represents both the interface and the container of the Random implementation used in the genetiK library. You can redefine your own Random, extending this class and passing it to the setImplementation method.
|
creates the default Random implementation. This constructor is protected because you don't need to create any instance of this class. You can set this class as the Random imlementation by calling Random::SetDefaultImplementation(); |
|
destroy the current implementation. Call this method to free the memory. |
|
returns the current implementation of the random. The framework call this method to retrieve the current implementation of the random. |
|
Returns the next pseudorandom integer. This method returns the next pseudorandom integer, you can override it in your random implementation. Returns an unsigned int greater than or equal to 0 and less than max;
Implemented in genetiK::util::RandomDefault. |
|
Returns the next pseudorandom integer. This method returns the next pseudorandom integer, you can override it in your random implementation. Returns an unsigned int greater than or equal to 0 and less than 4294967296; Implemented in genetiK::util::RandomDefault. |
|
Returns the next pseudorandom integer. This method returns the next pseudorandom double, you can override this method in your random implementation. Returns a double greater than or equal to 0.0 and less than 1.0; Implemented in genetiK::util::RandomDefault. |
|
sets the default implementation of the Random. Call this function to set the default implementation of the random. This method will be automatically called by the EvolutionaryAlgorithm if no Random implementation is set. |
|
sets an implementation of the Random. Call this function to set a new implementation of the random for the GenetiK Library.
|