Observing::GaObserver Class Reference

GaObserver interface is base class for all algorithms' observers. This interface has defined methods to handle each event which can be raised by an algorithm. More...

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

Inherited by Observing::GaObserverAdapter, and Observing::GaObserversList.

List of all members.

Public Member Functions

virtual ~GaObserver ()
 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 StatisticUpdate (const GaStatistics &statistics, const GaAlgorithm &algorithm)=0
 This method handles event which is raised at the end of a generation by the algorithm.
virtual void GACALL NewBestChromosome (const GaChromosome &newChromosome, const GaAlgorithm &algorithm)=0
 This method handles event which is raised when algorithm finds new chromosome (solution) which is better then the best chromosome of previous generation.
virtual void GACALL EvolutionStateChanged (GaAlgorithmState newState, const GaAlgorithm &algorithm)=0
 This method handles event which is raised when state of algorithm's execution is change.


Detailed Description

GaObserver interface is base class for all algorithms' observers. This interface has defined methods to handle each event which can be raised by an algorithm.


Constructor & Destructor Documentation

virtual Observing::GaObserver::~GaObserver (  )  [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 Observing::GaObserver::StatisticUpdate ( const GaStatistics statistics,
const GaAlgorithm algorithm 
) [pure virtual]

This method handles event which is raised at the end of a generation by the algorithm.

Parameters:
statistics reference to object with statistical information.
algorithm reference the algorithm which raised event.

Implemented in Observing::GaObserverAdapter, and Observing::GaObserversList.

virtual void GACALL Observing::GaObserver::NewBestChromosome ( const GaChromosome newChromosome,
const GaAlgorithm algorithm 
) [pure virtual]

This method handles event which is raised when algorithm finds new chromosome (solution) which is better then the best chromosome of previous generation.

Parameters:
newChromosome reference to the chromosome.
algorithm reference the algorithm which raised event.

Implemented in Observing::GaObserverAdapter, and Observing::GaObserversList.

virtual void GACALL Observing::GaObserver::EvolutionStateChanged ( GaAlgorithmState  newState,
const GaAlgorithm algorithm 
) [pure virtual]

This method handles event which is raised when state of algorithm's execution is change.

Parameters:
newState new state of algorithm's execution
algorithm reference the algorithm which raised event.

Implemented in Observing::GaObserverAdapter, and Observing::GaObserversList.


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

Genetic Algorithm Library
Coolsoft Software Development