Population::GaPopulation Class Reference

GaPopulation class is used to host chromosomes. Population also provides statistical information about chromosomes in population by using GaStatistics class. Same chromosome can be hosted by multiple populations because they are stored in population using scaled chromosome object which contains smart pointer to chromosome and value of scaled fitness (because this value depends on population, but not on chromosome itself and same chromosome can be in multiple populations). Chromosomes in population can be sorted which provides easy way of tracking best and worst chromosomes, but if chromosomes are not sorted, population provides to sorted groups which stores indices of best and worst chromosomes. Sorting of chromosomes in population or in sorted groups is done my using provided sorting comparator. Both scaled and non-scaled fitness values of chromosomes can be used for sorting, which value is going to be used depends on specified parameters, but if scaling operation is not defined for the population, non-scaled fitness values are used. Maximal number of chromosomes which can be hosted is specified in population's parameters. Also whether the population is going to be fixed-size (number of chromosomes in population is always equals to maximal number of chromosomes it can store) or resizable (population can host from 0 to maximal number of chromosomes) is specified in population's parameters. During population initialization, provided prototype is used to create chromosomes which fill the population. Fixed-size populations are always filled during initialization, which is not the case with resizable populations. Besides hosting of chromosomes, population also binds extern genetic operations (selection, coupling, scaling, and replacement) which are going to be used by genetic algorithm during evolution. More...

#include <D:/Temp/vs/gal/source/Population.h>

List of all members.

Public Member Functions

GAL_API GaPopulation (GaChromosome *prototype, GaPopulationConfiguration *configuration)
 This constructor initializes population with its configuration and prototype chromosomes. It also allocates memory for array which is used to store chromosomes, and initializes sorted groups which keep track of best and worst chromosomes.
GAL_API ~GaPopulation ()
 Destructor frees memory used by scaled chromosome objects which are hosted in population and array which stores them.
GAL_API GaPopulation *GACALL Clone (bool copyChromosomes) const
 Clone method makes copy of population's object. It can make copy of whole object (with setup and chromosomes) or it can make empty copy of population's object (only setup, without coping chromosomes). Copying of chromosomes is done by making new scaled chromosomes object which holds smart pointers to same chromosomes. Caller is responsible for memory allocated by this method for new population's object.
GAL_API void GACALL InitializePopulation (bool fill=true)
 This method removes all chromosomes from population and clears sorted group and statistical information. If population is not resizable or user specified so, population is filled with new chromosomes which are built based on provided prototype, also it sorts new chromosomes if needed and update sorted groups and statistical information.
GAL_API int GACALL GetBestChromosomes (int *results, int start, int numberOfChromosomes) const
 This method fills provided array with indices of best chromosomes in population. If population is not sorted this method can only provide number of best chromosomes which is equal to number of tracked best chromosomes.
GAL_API int GACALL GetBestChromosomes (GaChromosomePtr *results, int start, int numberOfChromosomes) const
 This method fills provided array with smart pointer to best chromosomes in population. If population is not sorted this method can only provide number of best chromosomes which is equal to number of tracked best chromosomes.
GAL_API int GACALL GetWorsChromosomes (int *results, int start, int numberOfChromosomes) const
 This method fills provided array with smart pointer to worst chromosomes in population. If population is not sorted this method can only provide number of worst chromosomes which is equal to number of tracked worst chromosomes.
GAL_API int GACALL GetWorsChromosomes (GaChromosomePtr *results, int start, int numberOfChromosomes) const
 This method fills provided array with indices of worst chromosomes in population. If population is not sorted this method can only provide number of worst chromosomes which is equal to number of tracked worst chromosomes.
GAL_API int GACALL Replace (int index, GaChromosomePtr newChromosome)
 Replace method removes chromosome with specified index from population and insert new chromosome. Scaled fitness value of new chromosome is automatically calculated. This method preserve sorting of chromosomes and update sorted group and statistical information.
GAL_API int GACALL ReplaceGroup (int *indices, GaChromosomePtr *newChromosomes, int numberOfChromosomes)
 Replace method removes group of chromosomes with specified indices from population and insert new chromosomes. Scaled fitness values of new chromosomes are automatically calculated. If index of one chromosome in specified more then once in array of chromosomes which should be removed, results are unexpected and may lead to failures. This method preserve sorting of chromosomes and update sorted group and statistical information.
GAL_API int GACALL Insert (GaChromosomePtr chromosome)
 Insert method inserts new chromosome into population. If population is not sorted new chromosome can be inserted if population is resizable and is not full. If population is sorted new chromosome is inserted at appropriate place (according to sorting policy), but if population is fixed-size or resizable but full, this method virtually extends population size by one before it inserts chromosome, after inserting it removes chromosome with worst fitness value (new chromosome is also included). This method preserve sorting of chromosomes and update sorted group and statistical information.
GAL_API int GACALL InsertGroup (GaChromosomePtr *chromosomes, int numberOfChromosomes)
 Insert method inserts new chromosomes into population. If population is not sorted new chromosomes can be inserted if population is resizable and is not full, if there is more new chromosomes then space in population, only first chromosomes are inserted. If population is sorted new chromosomes are inserted at appropriate places (according to sorting policy), but if population is fixed-size or resizable but full, this method virtually extends population size so it is able to host all chromosome before it inserts chromosomes, after inserting it removes chromosomes with worst fitness values(new chromosomes are also included). This method preserve sorting of chromosomes and update sorted group and statistical information.
GAL_API int GACALL Remove (int chromosome)
 Remove method removes chromosome with specified index from population. To remove chromosome from population, it must be resizable. This method preserve sorting of chromosomes and update sorted group and statistical information.
GAL_API int GACALL RemoveGroup (int *chromosomes, int numberOfChromosomes)
 Remove method removes chromosomes with specified indices from population. To remove chromosomes from population, it must be resizable. If index of one chromosome in specified more then once in array of chromosomes which should be removed, results are unexpected and may lead to failures. This method preserve sorting of chromosomes and update sorted group and statistical information.
void GACALL NextGeneration ()
 NextGeneration method prepares population for new generation. It should be called before new cycle of execution of genetic operations by genetic algorithm.
void GACALL EndOfGeneration (const GaPopulation &previous)
 EndOfGeneration method is used for evolutions with non-overlapping population. It is used to finalize cycle of genetic operations' execution and should be called by genetic algorithm at the end of a generation.
void GACALL EndOfGeneration ()
 EndOfGeneration method is used for evolutions with overlapping population. It is used to finalize cycle of genetic operations' execution and should be called by genetic algorithm at the end of a generation.
GAL_API void GACALL Clear (bool clearStatistics)
 Clear method removes all chromosomes form population and clears statistical information if specified.
GAL_API int GACALL GetChromosomeRanking (int chromosomeIndex, bool reverse=false)
 GetChromosomeRanking method returns ranking of chromosomes with specified index based on its fitness value (scaled or non-scaled). If population is sorted, all chromosomes has ranking. If it is unsorted only chromosomes in best and worst sorted groups has ranking. Also inverse chromosome ranking can be queried.
GaScaledChromosome &GACALL GetAt (int position) const
 This method is not thread-safe.
const GaStatistics &GACALL GetStatistics () const
 This method is not thread-safe.
const GaPopulationConfigurationGetConfiguration () const
 This method is not thread-safe.
void SetConfiguration (GaPopulationConfiguration *configuration)
 SetConfiguration method sets population's configuration.
bool GACALL IsScaledFitnessUsed ()
 This method is not thread-safe.
const GaChromosome &GACALL GetPrototype () const
 This method is not thread-safe.
int GACALL GetCurrentSize () const
 This method is not thread-safe.

Private Member Functions

GAL_API void SetParameters (const GaPopulationParameters &parameters)
 SetParameters method sets parameters of population. It copies values of parameters into built-in parameters' object of population and updates population according to new parameters.
GAL_API void SetSortComparator (const GaFitnessComparator *comparator)
 SetSortComaprator method sets fitness comparator which is used for sorting chromosomes. It update sorting of chromosomes, sorted groups and statistical information according to new sorting policy.
void GACALL RefreshBestGroup ()
 RefreshBestGroup method refreshes content of best sorted group.
void GACALL RefreshWorstGroup ()
 RefreshWorstGroup method refreshes content of worst sorted group. This method is not thread-safe.
GAL_API void GACALL UpdateStatistics (float fitnessChange, float scaledFitnessChange)
 UpdateStatistics method updates all population statistics. This method is not thread-safe.
GAL_API void GACALL RescaleAll ()
 RescaleAll method recalculates scaled fitness values of all chromosomes in population and stores them. It also updates population statistics.
GAL_API void GACALL ResortPopulation (bool refreshFitnesses, bool scalingChanged, bool comparatorChanged)
 ResortPopulation method resorts population when some of part of sorting policy is changed. After resorting, method updates statistics. If population is not sorted, this method updates sorted group.

Static Private Member Functions

static GAL_API int APICALL SortComparison (const void *first, const void *second)
 This method is used by CRT's qsort function for sorting array which stores chromosomes.

Private Attributes

 DEFINE_SYNC_CLASS
bool _usingScaledFitness
 If this attribute is set to true, scaled fitness values are used for sorting chromosomes in population. If it is set to false, original (non-scaled) fitness values are used. Value of this attribute is copied from population's parameters.
int _currentSize
 Number of chromosomes currently in population.
GaStatistics _statistics
 Statistical information about population.
GaScaledChromosome ** _chromosomes
 Pointer to array of scaled chromosome objects. Chromosomes which belong to population are stored in this array.
GaChromosome_prototype
 Pointer to chromosome which represents prototype for initialization of population.
GaSortedGroup _best
 This sorted group keeps track of best chromosomes in population. If population is sorted, this group is ignored. Group uses same fitness comparator for sorting as population.
GaSortedGroup _worst
 This sorted group keeps track of worst chromosomes in population. If population is sorted, this group is ignored. Group uses same fitness comparator for sorting as population, but it inverse results of comparisons in order to provide inverse sorting of chromosomes.
GaPopulationConfiguration_configuration
GaPopulationParameters _parameters
 Population's parameters.

Friends

class GaPopulationConfiguration


Detailed Description

GaPopulation class is used to host chromosomes. Population also provides statistical information about chromosomes in population by using GaStatistics class. Same chromosome can be hosted by multiple populations because they are stored in population using scaled chromosome object which contains smart pointer to chromosome and value of scaled fitness (because this value depends on population, but not on chromosome itself and same chromosome can be in multiple populations). Chromosomes in population can be sorted which provides easy way of tracking best and worst chromosomes, but if chromosomes are not sorted, population provides to sorted groups which stores indices of best and worst chromosomes. Sorting of chromosomes in population or in sorted groups is done my using provided sorting comparator. Both scaled and non-scaled fitness values of chromosomes can be used for sorting, which value is going to be used depends on specified parameters, but if scaling operation is not defined for the population, non-scaled fitness values are used. Maximal number of chromosomes which can be hosted is specified in population's parameters. Also whether the population is going to be fixed-size (number of chromosomes in population is always equals to maximal number of chromosomes it can store) or resizable (population can host from 0 to maximal number of chromosomes) is specified in population's parameters. During population initialization, provided prototype is used to create chromosomes which fill the population. Fixed-size populations are always filled during initialization, which is not the case with resizable populations. Besides hosting of chromosomes, population also binds extern genetic operations (selection, coupling, scaling, and replacement) which are going to be used by genetic algorithm during evolution.

This class has built-in synchronizator so it is allowed to use LOCK_OBJECT and LOCK_THIS_OBJECT macros with instances of this class. No public or private methods are thread-safe.


Constructor & Destructor Documentation

Population::GaPopulation::GaPopulation ( GaChromosome prototype,
GaPopulationConfiguration configuration 
)

This constructor initializes population with its configuration and prototype chromosomes. It also allocates memory for array which is used to store chromosomes, and initializes sorted groups which keep track of best and worst chromosomes.

Parameters:
prototype pointer to chromosomes which is prototype for making chromosomes during population initialization.
configuration pointer to population's configuration.

Population::GaPopulation::~GaPopulation (  ) 

Destructor frees memory used by scaled chromosome objects which are hosted in population and array which stores them.


Member Function Documentation

GaPopulation * Population::GaPopulation::Clone ( bool  copyChromosomes  )  const

Clone method makes copy of population's object. It can make copy of whole object (with setup and chromosomes) or it can make empty copy of population's object (only setup, without coping chromosomes). Copying of chromosomes is done by making new scaled chromosomes object which holds smart pointers to same chromosomes. Caller is responsible for memory allocated by this method for new population's object.

This method is not thread-safe.

Parameters:
copyChromosomes if this parameter is set to true, both setup and chromosomes are copied to new object, otherwise new object is empty, but with same setup.

void Population::GaPopulation::InitializePopulation ( bool  fill = true  ) 

This method removes all chromosomes from population and clears sorted group and statistical information. If population is not resizable or user specified so, population is filled with new chromosomes which are built based on provided prototype, also it sorts new chromosomes if needed and update sorted groups and statistical information.

This method is not thread-safe.

Parameters:
fill if this parameter is set to true, population is filled wit new chromosomes built on specified prototype. If this parameter is set to false, population is only cleared. This parameter is ignored if population is not resizable, and population is always filled.
Returns:
Method returns pointer to newly created chromosome's object.

int Population::GaPopulation::GetBestChromosomes ( int *  results,
int  start,
int  numberOfChromosomes 
) const

This method fills provided array with indices of best chromosomes in population. If population is not sorted this method can only provide number of best chromosomes which is equal to number of tracked best chromosomes.

This method is not thread-safe.

Parameters:
results pointer to array which is going to be filled.
start index of the first best chromosome which is going to be copied.
numberOfChromosomes number of queried chromosomes' indices.
Returns:
Method returns number of saved indices in output array.

int Population::GaPopulation::GetBestChromosomes ( GaChromosomePtr results,
int  start,
int  numberOfChromosomes 
) const

This method fills provided array with smart pointer to best chromosomes in population. If population is not sorted this method can only provide number of best chromosomes which is equal to number of tracked best chromosomes.

This method is not thread-safe.

Parameters:
results pointer to array which is going to be filled.
start index of the first best chromosome which is going to be copied.
numberOfChromosomes number of queried chromosome' indices.
Returns:
Method returns number of saved smart pointer to chromosomes in output array.

int Population::GaPopulation::GetWorsChromosomes ( int *  results,
int  start,
int  numberOfChromosomes 
) const

This method fills provided array with smart pointer to worst chromosomes in population. If population is not sorted this method can only provide number of worst chromosomes which is equal to number of tracked worst chromosomes.

This method is not thread-safe.

Parameters:
results pointer to array which is going to be filled.
start index of the last worst chromosome which is going to be copied.
numberOfChromosomes number of queried chromosome' indices.
Returns:
Method returns number of saved indices in output array.

int Population::GaPopulation::GetWorsChromosomes ( GaChromosomePtr results,
int  start,
int  numberOfChromosomes 
) const

This method fills provided array with indices of worst chromosomes in population. If population is not sorted this method can only provide number of worst chromosomes which is equal to number of tracked worst chromosomes.

This method is not thread-safe.

Parameters:
results pointer to array which is going to be filled.
start index of the last worst chromosome which is going to be copied.
numberOfChromosomes number of queried chromosome' indices.
Returns:
Method returns number of saved smart pointer to chromosomes in output array.

int Population::GaPopulation::Replace ( int  index,
GaChromosomePtr  newChromosome 
)

Replace method removes chromosome with specified index from population and insert new chromosome. Scaled fitness value of new chromosome is automatically calculated. This method preserve sorting of chromosomes and update sorted group and statistical information.

This method is not thread-safe.

Parameters:
index index of chromosome which is going to be removed.
newChromosome smart pointer to chromosome which is going to be inserted into population.
Returns:
Method returns 1 if chromosome is replaced, otherwise returns 0.

int Population::GaPopulation::ReplaceGroup ( int *  indices,
GaChromosomePtr newChromosomes,
int  numberOfChromosomes 
)

Replace method removes group of chromosomes with specified indices from population and insert new chromosomes. Scaled fitness values of new chromosomes are automatically calculated. If index of one chromosome in specified more then once in array of chromosomes which should be removed, results are unexpected and may lead to failures. This method preserve sorting of chromosomes and update sorted group and statistical information.

This method is not thread-safe.

Parameters:
indices pointer to array of indices of chromosomes which are going to be removed.
newChromosomes pointer to array of smart pointer to chromosomes which are going to be inserted into population.
numberOfChromosomes number of chromosomes which are going to be replaced.
Returns:
Method returns number of replaced chromosomes.

int Population::GaPopulation::Insert ( GaChromosomePtr  chromosome  ) 

Insert method inserts new chromosome into population. If population is not sorted new chromosome can be inserted if population is resizable and is not full. If population is sorted new chromosome is inserted at appropriate place (according to sorting policy), but if population is fixed-size or resizable but full, this method virtually extends population size by one before it inserts chromosome, after inserting it removes chromosome with worst fitness value (new chromosome is also included). This method preserve sorting of chromosomes and update sorted group and statistical information.

This method is not thread-safe.

Parameters:
chromosome smart pointer to chromosome which is going to be inserted into population.
Returns:
Method returns 1 if chromosome is inserted, otherwise returns 0.

int Population::GaPopulation::InsertGroup ( GaChromosomePtr chromosomes,
int  numberOfChromosomes 
)

Insert method inserts new chromosomes into population. If population is not sorted new chromosomes can be inserted if population is resizable and is not full, if there is more new chromosomes then space in population, only first chromosomes are inserted. If population is sorted new chromosomes are inserted at appropriate places (according to sorting policy), but if population is fixed-size or resizable but full, this method virtually extends population size so it is able to host all chromosome before it inserts chromosomes, after inserting it removes chromosomes with worst fitness values(new chromosomes are also included). This method preserve sorting of chromosomes and update sorted group and statistical information.

This method is not thread-safe.

Parameters:
chromosomes pointer to array of smart pointer to chromosomes which are going to be inserted into population.
numberOfChromosomes number of chromosomes which should be inserted.
Returns:
Method returns number of inserted chromosomes.

int Population::GaPopulation::Remove ( int  chromosome  ) 

Remove method removes chromosome with specified index from population. To remove chromosome from population, it must be resizable. This method preserve sorting of chromosomes and update sorted group and statistical information.

This method is not thread-safe.

Parameters:
chromosome index of chromosome which is going to be removed.
Returns:
Method returns 1 if chromosome is removed, otherwise returns 0.

int Population::GaPopulation::RemoveGroup ( int *  chromosomes,
int  numberOfChromosomes 
)

Remove method removes chromosomes with specified indices from population. To remove chromosomes from population, it must be resizable. If index of one chromosome in specified more then once in array of chromosomes which should be removed, results are unexpected and may lead to failures. This method preserve sorting of chromosomes and update sorted group and statistical information.

This method is not thread-safe.

Parameters:
chromosomes pointer to array of indices of chromosomes which are going to be removed.
numberOfChromosomes number of chromosomes which are going to be removed.
Returns:
Method returns number of removed chromosomes.

void GACALL Population::GaPopulation::NextGeneration (  )  [inline]

NextGeneration method prepares population for new generation. It should be called before new cycle of execution of genetic operations by genetic algorithm.

This method is not thread-safe.

void GACALL Population::GaPopulation::EndOfGeneration ( const GaPopulation previous  )  [inline]

EndOfGeneration method is used for evolutions with non-overlapping population. It is used to finalize cycle of genetic operations' execution and should be called by genetic algorithm at the end of a generation.

This method is not thread-safe.

Parameters:
previous reference to population which is used in previous generation by the algorithm.

void GACALL Population::GaPopulation::EndOfGeneration (  )  [inline]

EndOfGeneration method is used for evolutions with overlapping population. It is used to finalize cycle of genetic operations' execution and should be called by genetic algorithm at the end of a generation.

This method is not thread-safe.

void Population::GaPopulation::Clear ( bool  clearStatistics  ) 

Clear method removes all chromosomes form population and clears statistical information if specified.

This method is not thread-safe.

Parameters:
clearStatistics if this parameter is set to true, method clears statistics and removes chromosomes, otherwise it keeps statistics.

int Population::GaPopulation::GetChromosomeRanking ( int  chromosomeIndex,
bool  reverse = false 
)

GetChromosomeRanking method returns ranking of chromosomes with specified index based on its fitness value (scaled or non-scaled). If population is sorted, all chromosomes has ranking. If it is unsorted only chromosomes in best and worst sorted groups has ranking. Also inverse chromosome ranking can be queried.

This method is not thread-safe.

Parameters:
chromosomeIndex index of chromosome which rank is queried.
reverse if this is set to true, inverse ranking is queried, otherwise normal ranking is queried.
Returns:
Method returns rnking of the chromosome in the population. If chromosome has no ranking, method returns -1.

GaScaledChromosome& GACALL Population::GaPopulation::GetAt ( int  position  )  const [inline]

This method is not thread-safe.

Parameters:
position index of chromosome.
Returns:
Method returns reference to scaled chromosome with specified index.

const GaStatistics& GACALL Population::GaPopulation::GetStatistics (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns reference to object which contains statistical information about population.

const GaPopulationConfiguration& Population::GaPopulation::GetConfiguration (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns reference to population configuration.

void Population::GaPopulation::SetConfiguration ( GaPopulationConfiguration configuration  )  [inline]

SetConfiguration method sets population's configuration.

This method is not thread-safe.

Parameters:
configuration pointer to new configuration object.

bool GACALL Population::GaPopulation::IsScaledFitnessUsed (  )  [inline]

This method is not thread-safe.

Returns:
Method returns true if population use scale fitness values for sorting. If population use non-scaled fitness values, it returns false.

const GaChromosome& GACALL Population::GaPopulation::GetPrototype (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns pointer to chromosome which is used as prototype during initialization of population.

int GACALL Population::GaPopulation::GetCurrentSize (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns number of chromosomes in population. If population is fixed size this method returns maximal number of chromosomes if population is initialized, or 0 if it is not.

void Population::GaPopulation::SetParameters ( const GaPopulationParameters parameters  )  [private]

SetParameters method sets parameters of population. It copies values of parameters into built-in parameters' object of population and updates population according to new parameters.

This method is not thread-safe.

Parameters:
parameters reference to object of new population's parameters.

void Population::GaPopulation::SetSortComparator ( const GaFitnessComparator comparator  )  [private]

SetSortComaprator method sets fitness comparator which is used for sorting chromosomes. It update sorting of chromosomes, sorted groups and statistical information according to new sorting policy.

This method is not thread-safe.

Parameters:
comparator pointer to new fitness comparator.

void GACALL Population::GaPopulation::RefreshBestGroup (  )  [inline, private]

RefreshBestGroup method refreshes content of best sorted group.

This method is not thread-safe.

void GACALL Population::GaPopulation::RefreshWorstGroup (  )  [inline, private]

RefreshWorstGroup method refreshes content of worst sorted group. This method is not thread-safe.

void Population::GaPopulation::UpdateStatistics ( float  fitnessChange,
float  scaledFitnessChange 
) [private]

UpdateStatistics method updates all population statistics. This method is not thread-safe.

Parameters:
fitnessChange value by which sum of non-scaled fitness values of all chromosomes in population has change after last update.
scaledFitnessChange value by which sum of scaled fitness values of all chromosomes in population has change after last update.

void Population::GaPopulation::RescaleAll (  )  [private]

RescaleAll method recalculates scaled fitness values of all chromosomes in population and stores them. It also updates population statistics.

void Population::GaPopulation::ResortPopulation ( bool  refreshFitnesses,
bool  scalingChanged,
bool  comparatorChanged 
) [private]

ResortPopulation method resorts population when some of part of sorting policy is changed. After resorting, method updates statistics. If population is not sorted, this method updates sorted group.

This method is not thread-safe.

Parameters:
refreshFitnesses if this parameter is set to true, before resorting all fitness values should be recalculated (i.e. after change of fitness operation).
scalingChanged if this parameter is set to true, before resorting all scaled fitness values should be recalculated (i.e. after change of scaling operation).
comparatorChanged this parameter indicates that fitness comparator which is used for sorting has changed.

int Population::GaPopulation::SortComparison ( const void *  first,
const void *  second 
) [static, private]

This method is used by CRT's qsort function for sorting array which stores chromosomes.


Friends And Related Function Documentation

friend class GaPopulationConfiguration [friend]


Member Data Documentation

If this attribute is set to true, scaled fitness values are used for sorting chromosomes in population. If it is set to false, original (non-scaled) fitness values are used. Value of this attribute is copied from population's parameters.

Number of chromosomes currently in population.

Statistical information about population.

Pointer to array of scaled chromosome objects. Chromosomes which belong to population are stored in this array.

Pointer to chromosome which represents prototype for initialization of population.

This sorted group keeps track of best chromosomes in population. If population is sorted, this group is ignored. Group uses same fitness comparator for sorting as population.

This sorted group keeps track of worst chromosomes in population. If population is sorted, this group is ignored. Group uses same fitness comparator for sorting as population, but it inverse results of comparisons in order to provide inverse sorting of chromosomes.

Population's parameters.


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

Genetic Algorithm Library
Coolsoft Software Development