#include <Problem.h>
Inheritance diagram for gal::Problem< T >:
Public Member Functions | |
virtual Chromosome< T > *const | constructChromosome (int chromoLength)=0 |
Returns a new Chromosome<T>. | |
virtual Chromosome< T > *const | copyChromosome (Chromosome< T > *chromo)=0 |
Returns a new Chromosome<T>, which is a copy of the specified chromosome. | |
virtual void const | deleteChromosome (Chromosome< T > *chromo)=0 |
Deletes a Chromosome<T>* Usually this will be an instance of *a subclass of* Chromosome<T>. | |
virtual double const | evaluateObjective (Chromosome< T > *chromo)=0 |
Evaluates the objective function for the value that a chromosome represents. |
A gal::Population requires an instance of a subclass of gal::Problem. Both the objective function and some representation-related functions are relevant.
You always need to use a subclass of this class, where all virtual functions below are defined.
|
Returns a new Chromosome<T>. Usually this will be an instance of *a subclass of* Chromosome<T>. Implemented in gal::MaxIntProblem. |
|
Returns a new Chromosome<T>, which is a copy of the specified chromosome. Usually this will be an instance of *a subclass of* Chromosome<T>. (necessary, because static typing makes a copy constructor impossible) Implemented in gal::MaxIntProblem. |
|
Deletes a Chromosome<T>* Usually this will be an instance of *a subclass of* Chromosome<T>. (necessary, because static typing would otherwise default to the superclass's destructor, and would then result in a memory leak.) Implemented in gal::MaxIntProblem. |
|
Evaluates the objective function for the value that a chromosome represents.
Implemented in gal::MaxIntProblem. |