GLConstants Class Reference

#include <GLConstants.h>

List of all members.

Public Types

enum  TGeneBounds { BOUNDED_GENES = 0, UNBOUNDED_GENES = 1 }
enum  TMemoryPolicy { DO_NOT_FREE = 0, FREE_ALL = 1, FREE_UNLOCKED = 2 }
enum  TMutationPolicy { MUTATE_PARENTS = 0x01, MUTATE_CHILDREN = 0x02 }
enum  TSizeLimits { FIXED = 0, NOT_FIXED = 1 }
enum  TStorageFilling { REPLACE = 0, APPEND = 1 }
enum  TTwinsFlags { TWINS_ALLOWED = 0, NO_TWINS = 1 }

Static Public Member Functions

static string toString (TGeneBounds bounds)
static string toString (TMemoryPolicy memory)
static string toString (TSizeLimits limits)
static string toStringBreeder (int breeder_type)
static string toStringCrossover (int crossover_type)
static string toStringGaState (int ga_state)
static string toStringInitialiser (int initialiser_type)
static string toStringMutator (int mutator_type)
static string toStringPopulation (int population_type)
static string toStringRanker (int ranker_type)
static string toStringSelectionist (int selectionist_type)
static string toStringVariator (int variator_type)

Static Public Attributes

static const bool CORPSES_KEEP = true
static const bool CORPSES_DISPOSE = false
static const bool AND_OPERATOR = true
static const bool OR_OPERATOR = false
static const int GA_STATE_INITIALISED = 101
static const int GA_STATE_RUNNING = 105
 GA is running.
static const int GA_STATE_STOPPED_ERROR = 110
 GA stopped with error.
static const int GA_STATE_STOPPED_NORMALLY = 115
 GA stopped normally.
static const int MUTATOR_GENES_SWAPPING = 1001
 Mutator which swaps 2 genes.
static const int MUTATOR_GENES_SHUFFLING = 1002
 Mutator which shuffles several (randomly chosen) genes.
static const int MUTATOR_GENE_MOVING = 1003
 Mutator which moves gene into new position.
static const int MUTATOR_COMBINED = 1004
static const int CROSSOVER_VECTOR_KEEP_MATCHING_INT = 2001
static const int CROSSOVER_ONE_POINT = 2002
 One point crossover which exchanges tails of 2 parents.
static const int CROSSOVER_TWO_POINTS = 2003
static const int RANKER_STANDARD_SO = 3001
 Standard ranker for single objective GA.
static const int VARIATOR_STANDARD = 4001
static const int BREEDER_STANDARD = 5001
static const int SELECTIONIST_ELITIST = 6001
static const int SELECTIONIST_MIXER = 6002
static const int POPULATION_STANDARD = 7001
 standard population.
static const int INITIALISER_SHUFFLE_INT_VECTOR = 8001
 Generates vectors of randomly shuffled integers.


Detailed Description

Class for defining various useful constants for the library.

Definition at line 9 of file GLConstants.h.


Member Enumeration Documentation

Constants for limits on genes (elements of the organism)

Enumerator:
UNBOUNDED_GENES  Genes can take values between min and max values.

Definition at line 13 of file GLConstants.h.

Constants for policy of freeing the memory allocated to the organisms within some storage.

Definition at line 23 of file GLConstants.h.

Constants on policy to which organism mutation should be applied.

Definition at line 33 of file GLConstants.h.

Constants for the size property.

Enumerator:
NOT_FIXED  size of the object is fixed.

Definition at line 40 of file GLConstants.h.

Constants to indicate whether storage should be cleaned and filled with the new data or new data should be added to storage.

Definition at line 51 of file GLConstants.h.

Constants to be used with organism's tags Constants for specifying if twins (duplicated organisms) are allowed or not.

Definition at line 70 of file GLConstants.h.


Member Function Documentation

string GLConstants::toString ( TSizeLimits  limits  )  [static]

Returns string representing the value of limits constant. Useful for debug.

Parameters:
limits constant representing limits type of the object.
Returns:
string corresponding to name of the constant.

Definition at line 29 of file GLConstants.cpp.

string GLConstants::toString ( TMemoryPolicy  memory  )  [static]

Return string representing the memory policy. Using for debug output.

Parameters:
memory constant for memory policy.
Returns:
string corresponding to name of constant.

Definition at line 48 of file GLConstants.cpp.

string GLConstants::toString ( TGeneBounds  bounds  )  [static]

Returns string representing the value of bounds. Useful for debug.

Parameters:
bounds constant representing bounds of the gene.
Returns:
string corresponding to name of the constant.

Definition at line 9 of file GLConstants.cpp.

string GLConstants::toStringBreeder ( int  breeder_type  )  [static]

Returns string representing the value of the tag constant. Useful for debug.

Parameters:
tag constant representing tag.
Returns:
string corresponding to name of the constant. Returns string representing the value of the breeder type constant. Useful for debug.
Parameters:
breeder_type constant for breeder type.
Returns:
string which is the name for the constant.
Returns string representing the value of the breeder type constant. Useful for debug.
Parameters:
breeder_type constant for breeder type.
Returns:
string which is the name for the constant.

Definition at line 70 of file GLConstants.cpp.

string GLConstants::toStringCrossover ( int  crossover_type  )  [static]

Returns string representing the value of the crossover type constant. Useful for debug.

Parameters:
crossover_type constant for crossover type.
Returns:
string which is the name for the constant.

Definition at line 87 of file GLConstants.cpp.

string GLConstants::toStringGaState ( int  ga_state  )  [static]

Returns string representing the value of the current GA state. Useful for debug.

Parameters:
ga_state constant for GA state type.
Returns:
string which is the name for the constant.

Definition at line 104 of file GLConstants.cpp.

string GLConstants::toStringInitialiser ( int  initialiser_type  )  [static]

Returns string representing the value of the organism initialiser type constant. Useful for debug.

Parameters:
initialiser_type constant for organism initialiser type.
Returns:
string which is the name for the constant.

Definition at line 128 of file GLConstants.cpp.

string GLConstants::toStringMutator ( int  mutator_type  )  [static]

Returns string representing the value of the mutator type constant. Useful for debug.

Parameters:
mutator_type constant for mutator type.
Returns:
string which is the name for the constant.

Definition at line 146 of file GLConstants.cpp.

string GLConstants::toStringPopulation ( int  population_type  )  [static]

Returns string representing the value of the population type constant. Useful for debug.

Parameters:
population_type constant for population type.
Returns:
string which is the name for the constant.

Definition at line 169 of file GLConstants.cpp.

string GLConstants::toStringRanker ( int  ranker_type  )  [static]

Returns string representing the value of the ranker type constant. Useful for debug.

Parameters:
ranker_type constant for ranker type.
Returns:
string which is the name for the constant.

Definition at line 186 of file GLConstants.cpp.

string GLConstants::toStringSelectionist ( int  selectionist_type  )  [static]

Returns string representing the value of the selectionist type constant. Useful for debug.

Parameters:
selectionist_type constant for selectionist type.
Returns:
string which is the name for the constant.

Definition at line 203 of file GLConstants.cpp.

string GLConstants::toStringVariator ( int  variator_type  )  [static]

Returns string representing the value of the variator type constant. Useful for debug.

Parameters:
variator_type constant for variator type.
Returns:
string which is the name for the constant.

Definition at line 222 of file GLConstants.cpp.


Member Data Documentation

const bool GLConstants::AND_OPERATOR = true [static]

flag to indicate that 'AND' condition to be used for list of boolean operations.

Definition at line 87 of file GLConstants.h.

const int GLConstants::BREEDER_STANDARD = 5001 [static]

Constants for breeder type.Standard breeder which applies crossover to all organisms in storage with better organisms having more chances to breed.

Definition at line 152 of file GLConstants.h.

const bool GLConstants::CORPSES_DISPOSE = false [static]

Flag to indicate, that corpses are to be disposed of.

Definition at line 83 of file GLConstants.h.

const bool GLConstants::CORPSES_KEEP = true [static]

Flag to indicate that corpses are to be stored.

Definition at line 79 of file GLConstants.h.

const int GLConstants::CROSSOVER_TWO_POINTS = 2003 [static]

Two points crossover which exchanges section of 2 parents between two points.

Definition at line 132 of file GLConstants.h.

Constants for indicating the crossover types.Crossover which takes 2 vector-based organisms keeps coinciding genes in place and randomly shuffles the others.

Definition at line 127 of file GLConstants.h.

const int GLConstants::GA_STATE_INITIALISED = 101 [static]

Possible states for the genetic algorithm GA is initialised and idle

Definition at line 98 of file GLConstants.h.

Generates vectors of randomly shuffled integers.

Constants for organism initialisers.

Definition at line 174 of file GLConstants.h.

const int GLConstants::MUTATOR_COMBINED = 1004 [static]

Mutator which applies several mutators simultaniously to an organism or chooses randromly one from the set.

Definition at line 120 of file GLConstants.h.

const int GLConstants::MUTATOR_GENES_SWAPPING = 1001 [static]

Mutator which swaps 2 genes.

Constants for indicating the mutator types.

Definition at line 113 of file GLConstants.h.

const bool GLConstants::OR_OPERATOR = false [static]

flag to indicate that 'OR' condition to be used for list of boolean operations.

Definition at line 91 of file GLConstants.h.

const int GLConstants::POPULATION_STANDARD = 7001 [static]

standard population.

Constants for population type

Definition at line 168 of file GLConstants.h.

const int GLConstants::RANKER_STANDARD_SO = 3001 [static]

Standard ranker for single objective GA.

Constants for indicating the ranker type.

Definition at line 138 of file GLConstants.h.

const int GLConstants::SELECTIONIST_ELITIST = 6001 [static]

Constants for selectionist type.Elitist selectionist which mixes old and new generations and keeps the most fit organisms only.

Definition at line 159 of file GLConstants.h.

const int GLConstants::SELECTIONIST_MIXER = 6002 [static]

Selectionist which maintains variety by keeping only best elements of the old population and always adding elements from the new one.

Definition at line 162 of file GLConstants.h.

const int GLConstants::VARIATOR_STANDARD = 4001 [static]

Constantns for variator type.Standard variator which uniformly applies mutator to all organisms in storage.

Definition at line 145 of file GLConstants.h.


The documentation for this class was generated from the following files:

Generated on Sat Jun 13 13:58:08 2009 for GenLib by  doxygen 1.5.9