Algorithm::GaAlgorithm Class Reference

Interface for genetic algorithms. More...

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

Inherited by Algorithm::GaBaseAlgorithm.

List of all members.

Public Member Functions

virtual ~GaAlgorithm ()
 Because this is base class, virtual destructor must be defined in order to enable calling of right destructor (destructor of inheriting class).
virtual void GACALL StartSolving (bool continueSolving)=0
 This method starts execution of algorithm from beginning, or resumes previously paused execution.
virtual void GACALL StopSolving ()=0
 This method stops execution of algorithm. User cannot resume execution after call of this method; it can only start execution from beginning.
virtual void GACALL PauseSolving ()=0
 This method pauses execution of algorithm. User can resume, or can start execution from beginning.
virtual void GACALL BeginParameterChange ()=0
 This method should be called by user when changes of algorithm are required, such as change of a genetic operation or its parameters, stop criteria or other. It blocks thread which called this until it is safe to carry the changes, then it release the thread and blocks execution of algorithm if it running. This call should be fallowed by EndParametersChange call when it is over with changes.
virtual void GACALL EndParameterChange ()=0
 This method should be called by user when changes it is over with changes. It unblocks execution of algorithm if it was running.
virtual const
GaStopCriteriaPair &GACALL 
StopCriteria () const =0
 This method returns reference to object that holds pointer to stop criteria of by the algorithm and its parameters.
virtual void GACALL SetStopCriteria (GaStopCriteria *criteria, GaStopCriteriaParams *parameters)=0
 SetStopCriteria method sets stop criteria and its parameters which is used by genetic algorithm. It makes copy of parameters object by using GaParameters::Clone method.
virtual void GACALL SetStopCriteriaParams (GaStopCriteriaParams *parameters)=0
 SetStopCriteriaParams method sets parameters for stop criteria. It makes copy of parameters object by using GaParameters::Clone method.
virtual const
GaAlgorithmParams &GACALL 
GetAlgorithmParameters () const =0
 This method returns reference to algorithm parameters.
virtual void GACALL SetAlgorithmParameters (const GaAlgorithmParams &parameters)=0
 SetAlgorithmParameters method sets algorithm parameters.
virtual const GaStatistics &GACALL GetAlgorithmStatistics () const =0
 This method returns reference to object which contains statistical information about execution of algorithm.
virtual const GaPopulation &GACALL GetPopulation (int index) const =0
 GetPopulation method returns reference to population which is used by algorithm with specified index.
virtual GaAlgorithmState GACALL GetState () const =0
 This method returns algorithm's execution state.
virtual void GACALL SubscribeObserver (GaObserver *observer)=0
 This method subscribe observer to events of algorithm.
virtual void GACALL UnsubscribeObserver (GaObserver *observer)=0
 This method unsubscribe observer from events of algorithm.

Protected Member Functions

virtual void GACALL BlockParameterChanges ()=0
 This method should be called within algorithm when it enters critical section in which it cannot handle any changes of parameters, operation or other aspects. This call should be fallowed by ReleaseParameterChanges call when algorithm exits critical section.
virtual void GACALL ReleaseParameterChanages ()=0
 This method should be called within algorithm when it exit critical section it is able to handle changes of parameters, operation or other aspects.


Detailed Description

Interface for genetic algorithms.


Constructor & Destructor Documentation

virtual Algorithm::GaAlgorithm::~GaAlgorithm (  )  [inline, virtual]

Because this is base class, virtual destructor must be defined in order to enable calling of right destructor (destructor of inheriting class).


Member Function Documentation

virtual void GACALL Algorithm::GaAlgorithm::StartSolving ( bool  continueSolving  )  [pure virtual]

This method starts execution of algorithm from beginning, or resumes previously paused execution.

Parameters:
continueSolving if this parameter is set to false, algorithm starts execution from beginning, it clears previous state and results. If this parameter is set to true it continues previously paused execution.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::StopSolving (  )  [pure virtual]

This method stops execution of algorithm. User cannot resume execution after call of this method; it can only start execution from beginning.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::PauseSolving (  )  [pure virtual]

This method pauses execution of algorithm. User can resume, or can start execution from beginning.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::BeginParameterChange (  )  [pure virtual]

This method should be called by user when changes of algorithm are required, such as change of a genetic operation or its parameters, stop criteria or other. It blocks thread which called this until it is safe to carry the changes, then it release the thread and blocks execution of algorithm if it running. This call should be fallowed by EndParametersChange call when it is over with changes.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::EndParameterChange (  )  [pure virtual]

This method should be called by user when changes it is over with changes. It unblocks execution of algorithm if it was running.

Implemented in Algorithm::GaBaseAlgorithm.

virtual const GaStopCriteriaPair& GACALL Algorithm::GaAlgorithm::StopCriteria (  )  const [pure virtual]

This method returns reference to object that holds pointer to stop criteria of by the algorithm and its parameters.

Returns:
Method returns reference to object that holds pointer to stop criteria of by the algorithm and its parameters.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::SetStopCriteria ( GaStopCriteria criteria,
GaStopCriteriaParams parameters 
) [pure virtual]

SetStopCriteria method sets stop criteria and its parameters which is used by genetic algorithm. It makes copy of parameters object by using GaParameters::Clone method.

Parameters:
criteria pointer to new stop criteria.
parameters pointer to parameters of stop criteria.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::SetStopCriteriaParams ( GaStopCriteriaParams parameters  )  [pure virtual]

SetStopCriteriaParams method sets parameters for stop criteria. It makes copy of parameters object by using GaParameters::Clone method.

Parameters:
parameters pointer to parameters of stop criteria.

Implemented in Algorithm::GaBaseAlgorithm.

virtual const GaAlgorithmParams& GACALL Algorithm::GaAlgorithm::GetAlgorithmParameters (  )  const [pure virtual]

This method returns reference to algorithm parameters.

Returns:
Method returns reference to algorithm parameters.

Implemented in Algorithm::SimpleAlgorithms::GaIncrementalAlgorithm, and Algorithm::SimpleAlgorithms::GaSimpleAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::SetAlgorithmParameters ( const GaAlgorithmParams parameters  )  [pure virtual]

SetAlgorithmParameters method sets algorithm parameters.

Parameters:
parameters reference to new paremters of algorithm.

Implemented in Algorithm::SimpleAlgorithms::GaIncrementalAlgorithm, Algorithm::GaMultithreadingAlgorithm, and Algorithm::SimpleAlgorithms::GaSimpleAlgorithm.

virtual const GaStatistics& GACALL Algorithm::GaAlgorithm::GetAlgorithmStatistics (  )  const [pure virtual]

This method returns reference to object which contains statistical information about execution of algorithm.

Returns:
Method returns reference to object which contains statistical information about execution of algorithm.

Implemented in Algorithm::SimpleAlgorithms::GaIncrementalAlgorithm, and Algorithm::SimpleAlgorithms::GaSimpleAlgorithm.

virtual const GaPopulation& GACALL Algorithm::GaAlgorithm::GetPopulation ( int  index  )  const [pure virtual]

GetPopulation method returns reference to population which is used by algorithm with specified index.

Parameters:
index index of population.
Returns:
Method returns reference to population with specified index.

Implemented in Algorithm::SimpleAlgorithms::GaIncrementalAlgorithm, and Algorithm::SimpleAlgorithms::GaSimpleAlgorithm.

virtual GaAlgorithmState GACALL Algorithm::GaAlgorithm::GetState (  )  const [pure virtual]

This method returns algorithm's execution state.

Returns:
Method returns algorithm's execution state.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::SubscribeObserver ( GaObserver observer  )  [pure virtual]

This method subscribe observer to events of algorithm.

Parameters:
observer pointer to observer which should be subscribed.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::UnsubscribeObserver ( GaObserver observer  )  [pure virtual]

This method unsubscribe observer from events of algorithm.

Parameters:
observer pointer to observer which should be unsubscribed.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::BlockParameterChanges (  )  [protected, pure virtual]

This method should be called within algorithm when it enters critical section in which it cannot handle any changes of parameters, operation or other aspects. This call should be fallowed by ReleaseParameterChanges call when algorithm exits critical section.

Implemented in Algorithm::GaBaseAlgorithm.

virtual void GACALL Algorithm::GaAlgorithm::ReleaseParameterChanages (  )  [protected, pure virtual]

This method should be called within algorithm when it exit critical section it is able to handle changes of parameters, operation or other aspects.

Implemented in Algorithm::GaBaseAlgorithm.


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

Genetic Algorithm Library
Coolsoft Software Development