Population::GaSelectionOperation Class Reference

This class is interface for selection operation which selects chromosomes from population which are going to be used as parents in production of new chromosomes. More...

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

Inherits Common::GaOperation.

Inherited by Population::SelectionOperations::GaSelectBest, Population::SelectionOperations::GaSelectRandom, Population::SelectionOperations::GaSelectRouletteWheel, and Population::SelectionOperations::GaSelectWorst.

List of all members.

Public Member Functions

virtual void GACALL operator() (const GaPopulation &population, const GaSelectionParams &parameters, GaSelectionResultSet &result) const =0
 operator () performs replacement operation.
virtual GaSelectionResultSet
*GACALL 
MakeResultSet (GaPopulation *population, const GaSelectionParams &parameters) const
 MakeResultSet method makes result set used by selection operation for storing chromosomes indices. Caller is responsible for memory allocated by this method for result set object.


Detailed Description

This class is interface for selection operation which selects chromosomes from population which are going to be used as parents in production of new chromosomes.

This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class. No public or private methods are thread-safe.


Member Function Documentation

virtual void GACALL Population::GaSelectionOperation::operator() ( const GaPopulation population,
const GaSelectionParams parameters,
GaSelectionResultSet result 
) const [pure virtual]

operator () performs replacement operation.

Parameters:
population reference to population from which chromosomes are selected.
parameters reference to parameters of selection operation.
result pointer to result set which is used to store selected chromosomes.

Implemented in Population::SelectionOperations::GaSelectBest, Population::SelectionOperations::GaSelectRandom, Population::SelectionOperations::GaSelectRandomBest, Population::SelectionOperations::GaSelectRouletteWheel, Population::SelectionOperations::GaSelectTournament, and Population::SelectionOperations::GaSelectWorst.

virtual GaSelectionResultSet* GACALL Population::GaSelectionOperation::MakeResultSet ( GaPopulation population,
const GaSelectionParams parameters 
) const [inline, virtual]

MakeResultSet method makes result set used by selection operation for storing chromosomes indices. Caller is responsible for memory allocated by this method for result set object.

This method is thread-safe.

Parameters:
population pointer to population to which result set is bound.
parameters reference to parameters of selection operation.
Returns:
Method returns pointer to newly created result set.


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

Genetic Algorithm Library
Coolsoft Software Development