MTK++ Latest version: 0.2.0

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

Contains gaussian information used by gaSelection. More...

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

List of all members.

Public Member Functions

 gaGaussian ()
 gaGaussian Constructor
virtual ~gaGaussian ()
 gaGaussian Destructor
void setup (const int &st, const int &en, const double &stDe, const int &numInd)
 Set up gaGaussian.
int pick (double randomNum)
 Set up gaGaussian.

Protected Member Functions

void makeGaussian ()
 Generates the gaussian using the parameter provided to setup()

Protected Attributes

std::vector< double > gaussian
 Values that make up the gaussian.
int start
 Start value.
int end
 End value.
int numIndividuals
 Number of gaIndividuals in the population.
double stdDev
 Standard deviation of the gaussian.
double invStdDevPi2
 1/(stdDev*2.506628)

Detailed Description

Contains gaussian information used by gaSelection.

Author:
Martin Peters
Version:
0.1
Date:
2005

Constructor & Destructor Documentation

MTKpp::gaGaussian::gaGaussian ( )

gaGaussian Constructor

References end, invStdDevPi2, numIndividuals, start, and stdDev.

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

gaGaussian Destructor


Member Function Documentation

void MTKpp::gaGaussian::setup ( const int &  st,
const int &  en,
const double &  stDe,
const int &  numInd 
)

Set up gaGaussian.

Parameters:
stStart value for the gaussian
enEnd value for the gaussian
stDeStandard deviation of the gaussian (called selection pressure in input file)
numIndNumber of gaChromosomes per gaIndividual

References end, invStdDevPi2, makeGaussian(), numIndividuals, start, and stdDev.

Referenced by MTKpp::gaSelection::setGaussian().

int MTKpp::gaGaussian::pick ( double  randomNum)

Set up gaGaussian.

Parameters:
randomNumPicks gaIndividual using the gaussian and the random number

References end, gaussian, and start.

Referenced by MTKpp::gaSelection::__semi_random().

void MTKpp::gaGaussian::makeGaussian ( ) [protected]

Generates the gaussian using the parameter provided to setup()

References end, gaussian, invStdDevPi2, start, and stdDev.

Referenced by setup().


Member Data Documentation

std::vector<double> MTKpp::gaGaussian::gaussian [protected]

Values that make up the gaussian.

Referenced by makeGaussian(), and pick().

int MTKpp::gaGaussian::start [protected]

Start value.

Referenced by gaGaussian(), makeGaussian(), pick(), and setup().

int MTKpp::gaGaussian::end [protected]

End value.

Referenced by gaGaussian(), makeGaussian(), pick(), and setup().

Number of gaIndividuals in the population.

Referenced by gaGaussian(), and setup().

double MTKpp::gaGaussian::stdDev [protected]

Standard deviation of the gaussian.

Referenced by gaGaussian(), makeGaussian(), and setup().

double MTKpp::gaGaussian::invStdDevPi2 [protected]

1/(stdDev*2.506628)

Referenced by gaGaussian(), makeGaussian(), and setup().


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