Population::CouplingOperations::GaSimpleCoupling Class Reference

GaSimpleCoupling coupling takes first two parents and it produces two child using crossover operations, and each parent is bound to one child, then it takes next two parents, and so on... If all parents are used, but more children should be produced, this coupling operation wraps-around parent counter and starts from beginning until enough children is produced. This coupling use GaCouplingParams class for parameters. More...

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

Inherits Population::GaCouplingOperation.

List of all members.

Public Member Functions

virtual GAL_API void GACALL operator() (const GaPopulation &population, GaCouplingResultSet &output, const GaCouplingParams &parameters, int workerId, int numberOfWorkers) const
 More details are given in specification of GaCouplingOperation::operator () method.
virtual GaParameters *GACALL MakeParameters () const
 More details are given in specification of GaOperation::MakeParameters method.
virtual bool GACALL CheckParameters (const GaParameters &parameters) const
 Valid parameters must have number of offspring for production grater then 0.


Detailed Description

GaSimpleCoupling coupling takes first two parents and it produces two child using crossover operations, and each parent is bound to one child, then it takes next two parents, and so on... If all parents are used, but more children should be produced, this coupling operation wraps-around parent counter and starts from beginning until enough children is produced. This coupling use GaCouplingParams class for parameters.

s_cp.png

This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class. Because this genetic operation is stateless all public method are thread-safe.


Member Function Documentation

void Population::CouplingOperations::GaSimpleCoupling::operator() ( const GaPopulation population,
GaCouplingResultSet output,
const GaCouplingParams parameters,
int  workerId,
int  numberOfWorkers 
) const [virtual]

More details are given in specification of GaCouplingOperation::operator () method.

This method is thread-safe.

Implements Population::GaCouplingOperation.

virtual GaParameters* GACALL Population::CouplingOperations::GaSimpleCoupling::MakeParameters (  )  const [inline, virtual]

More details are given in specification of GaOperation::MakeParameters method.

This method is thread-safe.

Returns:
Method returns new instance of GaCouplingParams class.

Implements Common::GaOperation.

virtual bool GACALL Population::CouplingOperations::GaSimpleCoupling::CheckParameters ( const GaParameters parameters  )  const [inline, virtual]

Valid parameters must have number of offspring for production grater then 0.

More details are given in specification of GaOperation::CheckParameters method.

This method is thread-safe.

Implements Common::GaOperation.


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

Genetic Algorithm Library
Coolsoft Software Development