Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TrainingObserver Class Reference

Callback observer for monitoring training progress. More...

#include <trainer.h>

List of all members.

Public Methods

void initTraining ()
bool wantsToStop () const
virtual void cycleTrained (const Trainer &trainer, int totalCycles)=0

Protected Methods

void stopTraining ()


Detailed Description

Callback observer for monitoring training progress.

Patterns: Observer.

Definition at line 196 of file trainer.h.


Member Function Documentation

virtual void cycleTrained const Trainer   trainer,
int    totalCycles
[pure virtual]
 

Callback method for informing the observer that one cycle has been trained.

The Trainer::trainOnce() calls this method, after finishing with a training cycle.

Parameters:
trainer  The trainer object.
totalCycles  Total number of cycles trained so far.

Referenced by Trainer::train().

void initTraining   [inline]
 

Initializes the observer for a training.

Definition at line 201 of file trainer.h.

void stopTraining   [inline, protected]
 

The observer should call this method from the cycleTrained() method when it wants to stop training.

The training is stopped after the observer returns from the cycleTrained() method.

Definition at line 229 of file trainer.h.

bool wantsToStop   const [inline]
 

Returns true of the observer wants to stop learning.

For observer implementors: to inform the Trainer that the observer wants to stop learning, call the method stopTraining().

Definition at line 209 of file trainer.h.

Referenced by Trainer::train().


The documentation for this class was generated from the following file:
Generated on Thu Feb 10 20:06:46 2005 for Inanna by doxygen1.2.18