Classes | |
class | GaCatalogueEntry |
This template class manages key and pointer to data of a catalogue entry. Catalogue entry stores key's string value and pointer to data. Entry stores copied string value of a key. After binding data to an entry, entry object takes over responsibility for memory occupied by data. Data must be located at heap. More... | |
class | GaCatalogue |
GaCatalogue template class stores and manages catalogue (directory) for genetic operations. Data can be accessed by its key (name). When user adds new data into catalogue, catalogue takes over responsibility for memory allocated by the data. Data must come from heap. Key/data combination is stored in GaCatalogueEntry object. Duplicates of key in catalogue are not allowed. More... | |
class | GaParameters |
Interface for parameters of genetic operations. More... | |
class | GaOperation |
Interface for genetic operations. More... | |
class | GaOperationParametersPair |
This template class is used for storing genetic operations and their parameters. This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class. More... | |
union | GaUnsignedIntToFloat |
This union is used for conversation from 32-bits long integer random number to single precision floating point number in interval (0, 1). More... | |
union | GaUnsignedIntToDouble |
This union is used for conversation from 64-bits long integer random number to double precision floating point number in interval (0, 1). More... | |
class | GaRandomGenerator |
GaRandomGenerator class implements algorithm for generating 64-bits wide random unsigned integers and floating-point numbers. It takes care of architecture's endianness, but underlying CPU architecture must support floating-point by IEEE 754 standard. GaRandomGenerator class doesn't implement GaRandom interface. Primary purpose of this class is to provide service for generating random numbers for classes which implement GaRandom interface. More... | |
class | GaRandom |
Interface for random value generators. More... | |
class | GaRandomInteger |
GaRandomInteger class generates random 32-bits wide integer numbers. The class implements GaRandom interface. This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class, but all public methods are thread-safe. More... | |
class | GaRandomFloat |
GaRandomFloat class generates random single precision floating-point numbers. Targeted architecture must support IEEE 754 standard. The class implements GaRandom interface. This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class, but all public methods are thread-safe. More... | |
class | GaRandomDouble |
GaRandomDouble class generates random double precision floating-point numbers. Class takes care about endianness of the architecture. Targeted architecture must support IEEE 754 standard. The class implements GaRandom interface. This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class, but all public methods are thread-safe. More... | |
class | GaRandomBool |
GaRandomBool class generates random boolean values. It supports generating boolean with defined probabilities of true and false states. The class implements GaRandom interface. This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class, but all public methods are thread-safe. More... | |
class | GaSmartStorage |
GaSmartStorage template class provides reference-counting for smart pointers. GaSmartStorage objects holds address of used data and number of references (smart pointers) which point to the data. Object of this class as well as the data are destroyed and memory is freed when there are no more references which points to the data. Arrays cannot be used with this class. This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class, but all public method and operators are thread-safe. More... | |
class | GaSmartPtr |
GaSmartPtr template class wraps C++ raw pointers, and takes over responsibility of managing the allocated memory. Smart pointer holds address of user data and reference to an object which is responsible for counting number of references to data, when there are no instances of GaSmartPtr pointing to location of the data (reference count of the location reaches 0), object is destroyed and memory used by the object is freed. Memory management by GaSmartPtr class is thread-safe, but after dereferencing smart pointer to access the data, it cannot be guaranteed that memory will not be freed if some other thread changes dereferenced pointer. Implemented smart pointers have some limitations: 1. Dynamically allocated arrays cannot be managed by GaSmartPtr class. 2. Circular references can cause memory leakage. More... | |
class | GaStatValue |
GaStatValue template class stores single statistical value and keeps track of changes of that value between generations. More... | |
class | GaStatistics |
GaStatistics class keeps track of statistical information about populations, groups of populations or algorithms. It contains information about previous and current statistics, and provides information about progress of statistical values. More... | |
Typedefs | |
typedef GaStatValue< float > | GaFloatStatValue |
GaFloatStatValue type is instance of GaStatValue template class for single precision floating-point statistical values. | |
Enumerations | |
enum | GaRandomParams { GRP_BUFFER_SIZE = 17, GRP_OFFSET = 10, GRP_ROTATION_1 = 19, GRP_ROTATION_2 = 27 } |
Parameters used by GaRandomGenerator to generate random numbers. More... | |
enum | GaStatValueType { GSV_BEST_FITNESS, GSV_BEST_FITNESS_SCALED, GSV_AVG_FITNESS, GSV_AVG_FITNESS_SCALED, GSV_WORST_FITNESS, GSV_WORST_FITNESS_SCALED, GSV_TOTAL_FITNESS, GSV_TOTAL_FITNESS_SCALED, GSV_POPULATION_SIZE } |
GaStatValueType enumeration defines all types of statistical values which are managed my GaStatistics class. More... | |
Functions | |
bool GAL_API | FloatsEqual (float x, float y, int ulpTolerance=10) |
This method compares two single precision floating point numbers for equality with defined level of tolerance. | |
bool GAL_API | DoublesEqual (double x, double y, int ulpTolerance=10) |
This method compares two double precision floating point numbers for equality with defined level of tolerance. | |
Variables | |
const int | GaNumberOfStatValueTypes = GSV_POPULATION_SIZE - GSV_BEST_FITNESS + 1 |
This global constant contains number of statistical values in GaStatistic class and in GaStatValueType enumeration. |
typedef GaStatValue<float> Common::GaFloatStatValue |
GaFloatStatValue
type is instance of GaStatValue template class for single precision floating-point statistical values.
Parameters used by GaRandomGenerator to generate random numbers.
GaStatValueType
enumeration defines all types of statistical values which are managed my GaStatistics class.
bool GAL_API Common::DoublesEqual | ( | double | x, | |
double | y, | |||
int | ulpTolerance = 10 | |||
) | [inline] |
This method compares two double precision floating point numbers for equality with defined level of tolerance.
x | the first number | |
y | the second number | |
ulpTolerance | maximum difference between these two numbers in ULPs that is tolerated for almost equality. Default value is 10. |
true
if the two values are almost equal.bool GAL_API Common::FloatsEqual | ( | float | x, | |
float | y, | |||
int | ulpTolerance = 10 | |||
) | [inline] |
This method compares two single precision floating point numbers for equality with defined level of tolerance.
x | the first number | |
y | the second number | |
ulpTolerance | maximum difference between these two numbers in ULPs that is tolerated for almost equality. Default value is 10. |
true
if the two values are almost equal.
const int Common::GaNumberOfStatValueTypes = GSV_POPULATION_SIZE - GSV_BEST_FITNESS + 1 |
This global constant contains number of statistical values in GaStatistic class and in GaStatValueType enumeration.