MTK++ Latest version: 0.2.0

Public Member Functions | Protected Attributes
MTKpp::gaOperators Class Reference

This class performs the GA operations including crossover, mutation, averaging, etc. More...

#include <mtkpp/src/GA/gaOperators.h>

Collaboration diagram for MTKpp::gaOperators:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 gaOperators (gaRegion *parent=0)
 gaOperators Constructor
virtual ~gaOperators ()
 gaOperators Destructor
void setup ()
 Set up all GA operators including selection, crossover, mutate, averaging.
void keep (gaPopulation *curPop, gaPopulation *prePop)
 nKeep individuals of the new generation are individuals from the previous generation
void crossover (gaPopulation *curPop, gaPopulation *prePop)
 nCrossover individuals of the new generation are produced by recombination
void mutate (gaPopulation *curPop, gaPopulation *prePop)
 nMutate individuals of the new generation are produced by mutation
void average (gaPopulation *curPop, gaPopulation *prePop)
 nAverage individuals of the new generation are produced by averaging
void removeRedundant (gaPopulation *curPop, gaPopulation *prePop)
 Removes clones from the population.

Protected Attributes

gaRegionpParent
 gaRegion pointer
gaSelectionpGaSelection
 gaSelection pointer
gaCrossOverpGaCrossOver
 gaCrossOver pointer
gaMutatepGaMutate
 gaMutate pointer
gaAveragepGaAverage
 gaAverage pointer
gaOutputpGaOutput
 gaOutput pointer
int nKeep
 nKeep individuals of the new generation are individuals from the previous generation
int nCrossover
 nCrossover individuals of the new generation are produced by recombination
int nMutate
 nMutate individuals of the new generation are produced by mutation
int nAverage
 nAverage individuals of the new generation are produced by averaging
double chreDiff
 chromosome must difference greater than this quantity to be saved when removing clones
std::string mutantName
 mutant name

Detailed Description

This class performs the GA operations including crossover, mutation, averaging, etc.

Author:
Martin Peters
Version:
0.1
Date:
2005

Constructor & Destructor Documentation

MTKpp::gaOperators::gaOperators ( gaRegion parent = 0)
MTKpp::gaOperators::~gaOperators ( ) [virtual]

gaOperators Destructor


Member Function Documentation

void MTKpp::gaOperators::setup ( )
void MTKpp::gaOperators::keep ( gaPopulation curPop,
gaPopulation prePop 
)
void MTKpp::gaOperators::crossover ( gaPopulation curPop,
gaPopulation prePop 
)

nCrossover individuals of the new generation are produced by recombination

Each time two parents are selected only one child is produced

Two parents are allowed to produce nChild offspring

Parameters:
curPopCurrent gaPopulation
prePopPrevious gaPopulation

References MTKpp::gaPopulation::getIndividual(), MTKpp::gaPopulation::getName(), MTKpp::gaPopulation::getNumIndividuals(), nCrossover, pGaCrossOver, pGaSelection, MTKpp::gaCrossOver::reproduce(), and MTKpp::gaSelection::select().

Referenced by MTKpp::gaRegion::nextGeneration().

void MTKpp::gaOperators::mutate ( gaPopulation curPop,
gaPopulation prePop 
)
void MTKpp::gaOperators::average ( gaPopulation curPop,
gaPopulation prePop 
)
void MTKpp::gaOperators::removeRedundant ( gaPopulation curPop,
gaPopulation prePop 
)

Member Data Documentation

gaRegion pointer

Referenced by gaOperators(), keep(), and setup().

gaSelection pointer

Referenced by average(), crossover(), keep(), mutate(), and setup().

gaCrossOver pointer

Referenced by crossover(), mutate(), and setup().

gaMutate pointer

Referenced by mutate(), and setup().

gaAverage pointer

Referenced by average(), and setup().

gaOutput pointer

Referenced by gaOperators(), and setup().

int MTKpp::gaOperators::nKeep [protected]

nKeep individuals of the new generation are individuals from the previous generation

Referenced by gaOperators(), keep(), and setup().

nCrossover individuals of the new generation are produced by recombination

Referenced by crossover(), gaOperators(), and setup().

int MTKpp::gaOperators::nMutate [protected]

nMutate individuals of the new generation are produced by mutation

Referenced by gaOperators(), mutate(), removeRedundant(), and setup().

nAverage individuals of the new generation are produced by averaging

Referenced by average(), gaOperators(), and setup().

double MTKpp::gaOperators::chreDiff [protected]

chromosome must difference greater than this quantity to be saved when removing clones

Referenced by gaOperators(), removeRedundant(), and setup().

std::string MTKpp::gaOperators::mutantName [protected]

mutant name

Referenced by gaOperators(), mutate(), and removeRedundant().


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

Generated on Fri Dec 23 2011 09:28:55 for MTK++ by Doxygen 1.7.5.1