MTK++ Latest version: 0.2.0

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

Performs mutation of gaChromosomes. More...

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

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

List of all members.

Public Member Functions

 gaMutate (gaOperators *parent, std::vector< int > genePerChr, std::string mutate="single-gene", int chrPerInd=1)
 gaMutate Constructor
virtual ~gaMutate ()
 gaMutate Destructor
bool mutation (gaIndividual *ind)
 Main function of gaMutate.

Protected Member Functions

bool __singleGene (gaIndividual *ind)
 Single gene mutation.
bool __multipleGene (gaIndividual *ind)
 Multiple gene mutation.

Protected Attributes

gaOperatorspParent
 gaOperator pointer
std::string mutate
 Type of mutation to be carried out.
int chrPerInd
 Number of gaChromsomes per gaIndividual.
std::vector< int > genePerChr
 Number of gaGenes per gaChromsome.

Detailed Description

Performs mutation of gaChromosomes.

Author:
Martin Peters
Version:
0.1
Date:
2005

Constructor & Destructor Documentation

MTKpp::gaMutate::gaMutate ( gaOperators parent,
std::vector< int >  genePerChr,
std::string  mutate = "single-gene",
int  chrPerInd = 1 
)

gaMutate Constructor

Parameters:
parentgaOperators pointer
mutateType of mutation procedure employed
chrPerIndNumber of gaChromosomes per gaIndividual
genePerChrNumber of gaGenes per gaChromosome

References chrPerInd, genePerChr, mutate, and pParent.

MTKpp::gaMutate::~gaMutate ( ) [virtual]

gaMutate Destructor


Member Function Documentation

bool MTKpp::gaMutate::mutation ( gaIndividual ind)

Main function of gaMutate.

Parameters:
indgaIndividual pointer
Returns:
successful operation

References __singleGene(), and mutate.

Referenced by MTKpp::gaOperators::mutate().

bool MTKpp::gaMutate::__singleGene ( gaIndividual ind) [protected]

Single gene mutation.

Parameters:
indgaIndividual pointer

References chrPerInd, genePerChr, MTKpp::gaIndividual::mutateGene(), and MTKpp::ranNumBetweenZeroAndOne().

Referenced by mutation().

bool MTKpp::gaMutate::__multipleGene ( gaIndividual ind) [protected]

Multiple gene mutation.

Parameters:
indgaIndividual pointer

References chrPerInd, genePerChr, MTKpp::gaIndividual::mutateGene(), and MTKpp::ranNumBetweenZeroAndOne().


Member Data Documentation

gaOperator pointer

Referenced by gaMutate().

std::string MTKpp::gaMutate::mutate [protected]

Type of mutation to be carried out.

Referenced by gaMutate(), and mutation().

int MTKpp::gaMutate::chrPerInd [protected]

Number of gaChromsomes per gaIndividual.

Referenced by __multipleGene(), __singleGene(), and gaMutate().

std::vector<int> MTKpp::gaMutate::genePerChr [protected]

Number of gaGenes per gaChromsome.

Referenced by __multipleGene(), __singleGene(), and gaMutate().


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