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.
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. |
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.
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).
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.
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.
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.
newState | new state of algorithm's execution | |
algorithm | reference the algorithm which raised event. |
Implemented in Observing::GaObserverAdapter, and Observing::GaObserversList.