Genetic Algorithm Instance Interface. More...
#include <irinst.h>
Inheritance diagram for iRInst:
Public Member Functions | |
size_t | GetPopSize (void) const |
size_t | GetGen (void) const |
size_t | GetAgeBest (void) const |
size_t | GetAgeBestPop (void) const |
virtual void | Run (void)=0 |
virtual | ~iRInst (void) |
Protected Member Functions | |
iRInst (size_t popsize) | |
Protected Attributes | |
size_t | PopSize |
size_t | Gen |
size_t | AgeBest |
size_t | AgeBestPop |
bool | Pause |
Detailed Description
Genetic Algorithm Instance Interface.
Interface for an instance of the generic GA.
Constructor & Destructor Documentation
|
protected |
Construct the instance.
- Parameters
-
popsize The size of the population. name Name of the genetic algorithm.
|
virtual |
Destruct the instance.
Member Function Documentation
size_t GetPopSize | ( | void | ) | const |
- Returns
- the size of the population.
size_t GetGen | ( | void | ) | const |
- Returns
- the number of generations run.
size_t GetAgeBest | ( | void | ) | const |
- Returns
- the age of the best chromosome.
size_t GetAgeBestPop | ( | void | ) | const |
- Returns
- the age of the best chromosome ever calculate.
|
pure virtual |
This functions runs the GA.
Implemented in RInst< cInst, cChromo, cFit, cThreadData >, RInst< cInst, cChromo, RFitnessNN, cThreadData >, and RInst< cInst, cChromo, RFitnessSG, cThreadData >.
Member Data Documentation
|
protected |
Size of the population.
|
protected |
Number of generations.
|
protected |
Age of the best chromosome.
|
protected |
Age of the best chromosome ever calculate.
|
protected |
Determine if the GA is paused.