Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GAConfig Class Reference

#include <GAConfig.h>

Inheritance diagram for GAConfig::

GANagataConfig List of all members.

Public Types

enum  ElitistSelectionType { SIMPLE, STRONG, NONE }

Public Methods

 GAConfig (int popSize=50, int numOfGens=-1, int crossChance=100, int mutChance=100, ElitistSelectionType elitType=SIMPLE, bool fitScaling=true, int Report=1, int FitnessPrint=10, int PopulationPrint=100)
virtual bool setUserVariable (Chars varName, Chars value)
int populationSize () const
int numOfGenerations () const
double chanceOfCrossover () const
double chanceOfMutation () const
ElitistSelectionType elitistSelectionType () const
bool haveFitnessScaling () const
int report () const
int fitnessPrint () const
int populationPrint () const
virtual void readFrom (istream &istr)
virtual void printOn (ostream &ostr) const

Private Methods

void setVariable (Chars varName, Chars value)
void eatWhite (char *input)

Private Attributes

int population
int generations
int crossover
int mutation
ElitistSelectionType elitistSelection
bool bFitnessScaling
int theReport
int theFitnessPrint
int thePopulationPrint

Friends

ostream& operator<< (ostream &ostr, const GAConfig &C)
istream& operator>> (istream &istr, GAConfig &C)

Member Enumeration Documentation

enum GAConfig::ElitistSelectionType
 

Enumeration values:
SIMPLE  
STRONG  
NONE  

Definition at line 38 of file GAConfig.h.


Constructor & Destructor Documentation

GAConfig::GAConfig ( int popSize = 50,
int numOfGens = -1,
int crossChance = 100,
int mutChance = 100,
ElitistSelectionType elitType = SIMPLE,
bool fitScaling = true,
int Report = 1,
int FitnessPrint = 10,
int PopulationPrint = 100 )
 


Member Function Documentation

bool GAConfig::setUserVariable ( Chars varName,
Chars value ) [inline, virtual]
 

Reimplemented in GANagataConfig.

Definition at line 66 of file GAConfig.h.

int GAConfig::populationSize ( ) const [inline]
 

Definition at line 78 of file GAConfig.h.

int GAConfig::numOfGenerations ( ) const [inline]
 

Definition at line 80 of file GAConfig.h.

double GAConfig::chanceOfCrossover ( ) const [inline]
 

Definition at line 82 of file GAConfig.h.

double GAConfig::chanceOfMutation ( ) const [inline]
 

Definition at line 85 of file GAConfig.h.

ElitistSelectionType GAConfig::elitistSelectionType ( ) const [inline]
 

Definition at line 88 of file GAConfig.h.

bool GAConfig::haveFitnessScaling ( ) const [inline]
 

Definition at line 91 of file GAConfig.h.

int GAConfig::report ( ) const [inline]
 

Definition at line 93 of file GAConfig.h.

int GAConfig::fitnessPrint ( ) const [inline]
 

Definition at line 95 of file GAConfig.h.

int GAConfig::populationPrint ( ) const [inline]
 

Definition at line 97 of file GAConfig.h.

virtual void GAConfig::readFrom ( istream & istr ) [virtual]
 

Referenced by operator>>().

virtual void GAConfig::printOn ( ostream & ostr ) const [virtual]
 

Reimplemented in GANagataConfig.

Referenced by operator<<().

void GAConfig::setVariable ( Chars varName,
Chars value ) [private]
 

void GAConfig::eatWhite ( char * input ) [private]
 


Friends And Related Function Documentation

ostream & operator<< ( ostream & ostr,
const GAConfig & C ) [friend]
 

Definition at line 106 of file GAConfig.h.

istream & operator>> ( istream & istr,
GAConfig & C ) [friend]
 

Definition at line 112 of file GAConfig.h.


Member Data Documentation

int GAConfig::population [private]
 

Definition at line 144 of file GAConfig.h.

int GAConfig::generations [private]
 

Definition at line 145 of file GAConfig.h.

int GAConfig::crossover [private]
 

Definition at line 146 of file GAConfig.h.

int GAConfig::mutation [private]
 

Definition at line 147 of file GAConfig.h.

ElitistSelectionType GAConfig::elitistSelection [private]
 

Definition at line 148 of file GAConfig.h.

bool GAConfig::bFitnessScaling [private]
 

Definition at line 149 of file GAConfig.h.

int GAConfig::theReport [private]
 

Definition at line 150 of file GAConfig.h.

int GAConfig::theFitnessPrint [private]
 

Definition at line 151 of file GAConfig.h.

int GAConfig::thePopulationPrint [private]
 

Definition at line 152 of file GAConfig.h.


The documentation for this class was generated from the following file:
Generated at Tue Jun 19 09:49:53 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001