realea::EAlgorithm Class Reference
[Real Evolutionary Algorithms Common (Core classes)]

It represents an Evolutionary Algorithm. More...

#include <ea.h>

Inherits Resetable.

Collaboration diagram for realea::EAlgorithm:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 EAlgorithm (IEAlgorithm *alg, ProblemParamPtr problem)
virtual ~EAlgorithm (void)
void setMaxEval (unsigned int maxeval)
virtual void setPopsize (unsigned int popsize)
RunningPtr getRunning (void)
unsigned apply (tChromosomeReal &sol, tFitness *pfitness)
void setShow (Statistics *stat)

Protected Attributes

IEAlgorithm * m_alg
const unsigned default_popsize
internal::CrossBinaryPtr m_cross
Statistics * m_stat

Detailed Description

It represents an Evolutionary Algorithm.

Definition at line 40 of file ea.h.


Constructor & Destructor Documentation

EAlgorithm::EAlgorithm ( IEAlgorithm *  alg,
ProblemParamPtr  problem 
)

Constructor.

Parameters:
alg algorithm

Definition at line 29 of file ea.cc.

EAlgorithm::~EAlgorithm ( void   )  [virtual]

Destructor. Remove the Populations.

Definition at line 67 of file ea.cc.


Member Function Documentation

unsigned EAlgorithm::apply ( tChromosomeReal &  sol,
tFitness *  pfitness 
)

Apply the algorithm

Parameters:
sol best found solution, output
pfitness fitness of the best solution, output
Returns:
the evaluation numbers required for achieve the solution

Este método es el llamado para resolver el algoritmo evolutivo, si no se especificó una llamada de popsize le asigna el menor valor

Definition at line 111 of file ea.cc.

RunningPtr EAlgorithm::getRunning ( void   ) 
Returns:
the running criterion.

Definition at line 87 of file ea.cc.

void EAlgorithm::setMaxEval ( unsigned int  maxeval  ) 

Set the maximum number of evaluations

Parameters:
maxeval 

Definition at line 79 of file ea.cc.

void EAlgorithm::setPopsize ( unsigned int  popsize  )  [virtual]

Allow to set the popsize

Parameters:
popsize size of population

Definition at line 83 of file ea.cc.

void EAlgorithm::setShow ( Statistics *  stat  ) 

Set the class that obtain the statistical information

Parameters:
stat Statistical class

Definition at line 33 of file ea.cc.


Member Data Documentation

const unsigned realea::EAlgorithm::default_popsize [protected]

Default Popsize (obtained by setDefaultSize)

Definition at line 126 of file ea.h.

IEAlgorithm* realea::EAlgorithm::m_alg [protected]

Eval the solution

Parameters:
newind individual, it is updated with the fitness IEAlgorithm

Definition at line 123 of file ea.h.

Crossover operator

Definition at line 127 of file ea.h.

Statistics* realea::EAlgorithm::m_stat [protected]

Statistical class

Definition at line 128 of file ea.h.


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

Generated on Sun May 9 12:26:14 2010 for Realea by  doxygen 1.6.1