Algorithm::StopCriterias::GaFitnessCriteriaParams Class Reference

GaFitnessCriteriaParams class is used by GaFitnessCriteria class as parameters for the criteria. It contains desired fitness value of specified type and it also specifies type of comparison which is used to compare desired and current fitness values. More...

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

Inherits Algorithm::GaStopCriteriaParams.

List of all members.

Public Member Functions

 GaFitnessCriteriaParams (float fitnessLimit, GaFitnessCriteriaComparison comparison, GaStatValueType valueType)
 This constructor initializes parameters with user-defined values.
 GaFitnessCriteriaParams ()
 This constructor initializes parameters with default values. Default desired fitness value is 1, type of comparison is GFC_EQUALS_THEN and type of fitness value is GSV_BEST_FITNESS_SCALED.
virtual GaParameters *GACALL Clone () const
 More details are given in specification of GaParameters::Clone method.
float GACALL GetFitnessLimit () const
 This method is not thread-safe.
void GACALL SetFitnessLimit (float limit)
 SetFitnessLimit method sets desired fitness value.
GaFitnessCriteriaComparison GACALL GetComparison () const
 This method is not thread-safe.
void GACALL SetComparison (GaFitnessCriteriaComparison comparison)
 SetComparation method sets type of comparison of desired value and current value.
GaStatValueType GACALL GetValueType () const
 This method is not thread-safe.
void GACALL SetValueType (GaStatValueType type)
 SetValueType method sets type of fitness values which are compared.

Private Attributes

float _fitnessLimit
 Stores desired fitness value for stopping the algorithm.
GaFitnessCriteriaComparison _comparison
 Type of comparison of desired value and current value.
GaStatValueType _valueType
 Type of fitness values which are compared.


Detailed Description

GaFitnessCriteriaParams class is used by GaFitnessCriteria class as parameters for the criteria. It contains desired fitness value of specified type and it also specifies type of comparison which is used to compare desired and current fitness values.

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

Algorithm::StopCriterias::GaFitnessCriteriaParams::GaFitnessCriteriaParams ( float  fitnessLimit,
GaFitnessCriteriaComparison  comparison,
GaStatValueType  valueType 
) [inline]

This constructor initializes parameters with user-defined values.

Parameters:
fitnessLimit desired fitness value.
comparison type of comparison of desired and current fitness values.
valueType type of fitness values which are compared.

Algorithm::StopCriterias::GaFitnessCriteriaParams::GaFitnessCriteriaParams (  )  [inline]

This constructor initializes parameters with default values. Default desired fitness value is 1, type of comparison is GFC_EQUALS_THEN and type of fitness value is GSV_BEST_FITNESS_SCALED.


Member Function Documentation

virtual GaParameters* GACALL Algorithm::StopCriterias::GaFitnessCriteriaParams::Clone (  )  const [inline, virtual]

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

Implements Common::GaParameters.

float GACALL Algorithm::StopCriterias::GaFitnessCriteriaParams::GetFitnessLimit (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns desired fitness value.

void GACALL Algorithm::StopCriterias::GaFitnessCriteriaParams::SetFitnessLimit ( float  limit  )  [inline]

SetFitnessLimit method sets desired fitness value.

This method is not thread-safe.

Parameters:
limit desired fitness value.

GaFitnessCriteriaComparison GACALL Algorithm::StopCriterias::GaFitnessCriteriaParams::GetComparison (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns type of comparison of desired value and current value.

void GACALL Algorithm::StopCriterias::GaFitnessCriteriaParams::SetComparison ( GaFitnessCriteriaComparison  comparison  )  [inline]

SetComparation method sets type of comparison of desired value and current value.

This method is not thread-safe.

Parameters:
comparison type of comparison.

GaStatValueType GACALL Algorithm::StopCriterias::GaFitnessCriteriaParams::GetValueType (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns type of fitness values which are compared.

void GACALL Algorithm::StopCriterias::GaFitnessCriteriaParams::SetValueType ( GaStatValueType  type  )  [inline]

SetValueType method sets type of fitness values which are compared.

This method is not thread-safe.

Parameters:
type – type of fitness values.


Member Data Documentation

Stores desired fitness value for stopping the algorithm.

Type of comparison of desired value and current value.

Type of fitness values which are compared.


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

Genetic Algorithm Library
Coolsoft Software Development