Population::ReplacementOperations::GaReplaceElitismParams Class Reference

This class should be used (directly or by inheritance) by replacement operations which can unintentionally remove the best chromosomes from population. More...

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

Inherits Population::GaReplacementParams.

List of all members.

Public Member Functions

 GaReplaceElitismParams (int replacementSize, int elitism)
 This constructor initializes parameters with user defined values.
 GaReplaceElitismParams ()
 This constructor initializes parameters with default values. Default number of replaced chromosomes is 2, and default elitism size is 0.
virtual GaParameters *GACALL Clone () const
 More details are given in specification of GaParameters::Clone method.
int GACALL GetElitism () const
 This method is not thread-safe.
void GACALL SetElitism (int elitism)
 SetElitism method sets number of the best chromosomes that will not be removed from population by replacement operation.

Private Attributes

int _elitism
 Number of best chromosomes that will not be removed from population by replacement operation.


Detailed Description

This class should be used (directly or by inheritance) by replacement operations which can unintentionally remove the best chromosomes from population.

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.


Constructor & Destructor Documentation

Population::ReplacementOperations::GaReplaceElitismParams::GaReplaceElitismParams ( int  replacementSize,
int  elitism 
) [inline]

This constructor initializes parameters with user defined values.

Parameters:
replacementSize number of chromosomes which replaced by the operation.
elitism number of the best chromosomes that will not be removed from population by replacement operation.

Population::ReplacementOperations::GaReplaceElitismParams::GaReplaceElitismParams (  )  [inline]

This constructor initializes parameters with default values. Default number of replaced chromosomes is 2, and default elitism size is 0.


Member Function Documentation

virtual GaParameters* GACALL Population::ReplacementOperations::GaReplaceElitismParams::Clone (  )  const [inline, virtual]

More details are given in specification of GaParameters::Clone method.

This method is not thread-safe.

Reimplemented from Population::GaReplacementParams.

int GACALL Population::ReplacementOperations::GaReplaceElitismParams::GetElitism (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns number of the best chromosomes that will not be removed from population by replacement operation.

void GACALL Population::ReplacementOperations::GaReplaceElitismParams::SetElitism ( int  elitism  )  [inline]

SetElitism method sets number of the best chromosomes that will not be removed from population by replacement operation.

This method is not thread-safe.

Parameters:
elitism number of the best chromosomes that will not be removed.


Member Data Documentation

Number of best chromosomes that will not be removed from population by replacement operation.


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

Genetic Algorithm Library
Coolsoft Software Development