GLGeneticAlgorithmStandard Class Reference

#include <GLGeneticAlgorithmStandard.h>

Inheritance diagram for GLGeneticAlgorithmStandard:

GLBaseGeneticAlgorithm

List of all members.

Public Member Functions

 GLGeneticAlgorithmStandard (const GLParametersGeneticAlgorithm &parameters, GLFactory *factory)
virtual ~GLGeneticAlgorithmStandard ()
virtual const GLBaseGaStatusgetStatus () const
const GLGaStatusStandardgetStatusStandard () const
virtual void reset ()
virtual const GLBaseGaStatusrunGA (GLBaseOrganismInitialiser *initialiser, GLBaseEvaluator *evaluator, const TListOfStoppers &stoppers, bool bool_operator=GLConstants::OR_OPERATOR)


Detailed Description

Standard single objective GA.

Definition at line 18 of file GLGeneticAlgorithmStandard.h.


Constructor & Destructor Documentation

GLGeneticAlgorithmStandard::GLGeneticAlgorithmStandard ( const GLParametersGeneticAlgorithm parameters,
GLFactory factory 
)

Simple constructor.

Parameters:
parameters parameters of the GA. Just passed to the BaseGA.
factory factory to create GA elements (mutator, crossover etc.).

Definition at line 16 of file GLGeneticAlgorithmStandard.cpp.

GLGeneticAlgorithmStandard::~GLGeneticAlgorithmStandard (  )  [virtual]

Destructor. Destroys everything.

Definition at line 27 of file GLGeneticAlgorithmStandard.cpp.


Member Function Documentation

virtual const GLBaseGaStatus* GLGeneticAlgorithmStandard::getStatus (  )  const [inline, virtual]

Returns the current status of the genetic algorithm.

Returns:
pointer to the structure with the current status of the GA.

Implements GLBaseGeneticAlgorithm.

Definition at line 38 of file GLGeneticAlgorithmStandard.h.

const GLGaStatusStandard* GLGeneticAlgorithmStandard::getStatusStandard (  )  const [inline]

Returns the pointer to the status of the standard GA.

Returns:
pointer to the status of the standard GA.

Definition at line 45 of file GLGeneticAlgorithmStandard.h.

void GLGeneticAlgorithmStandard::reset (  )  [virtual]

Resets the GA after run -- resets all it elements, cleans the population and the current status, frees memory occupied by organisms etc. Make the GA ready to run again. The current status after the call of this method is set to GA_STATE_INITIALISED. Be careful not to reset the GA while it is running.

Reimplemented from GLBaseGeneticAlgorithm.

Definition at line 39 of file GLGeneticAlgorithmStandard.cpp.

const GLBaseGaStatus * GLGeneticAlgorithmStandard::runGA ( GLBaseOrganismInitialiser initialiser,
GLBaseEvaluator evaluator,
const TListOfStoppers &  stoppers,
bool  bool_operator = GLConstants::OR_OPERATOR 
) [virtual]

Runs the GA.

Parameters:
initialiser organism initialiser -- will determine which type of organism will be used for GA. Ideally it should allow to use the same exemplar of GA for solving entirely different problems by changing only initialiser and evaluator.
evaluator class for evaluating the fitness function.
stoppers list of stoppers which determine when the GA is to stop.
bool_operator if == AND_OPERATOR then GA stops when ALL stoppers indicate that, when == OR_OPERATOR (default) then it happens when at least ONE of the stoppers is satisfied.
Returns:
pointer to the structure with the GA status -- all the information necessary for post-processing the results, e.g. best ever organism in GA etc.

Implements GLBaseGeneticAlgorithm.

Definition at line 61 of file GLGeneticAlgorithmStandard.cpp.


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

Generated on Sat Jun 13 13:58:09 2009 for GenLib by  doxygen 1.5.9