Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Population< T, siz > Class Template Reference

Contains a population of parameter sets derived from class Individual. More...

#include <Population.h>

Collaboration diagram for Population< T, siz >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Population ()
 Constructor.

 ~Population ()
 Destructor.

T * getNextIndividualWithoutFitness ()
 returns the next individual thats fitness was not tested before, or NULL if all individuals have a fitness

double getBestFitness ()
 returns fitness of the best individual

void outputStatistics (OutTextRawFile *file=0)
 outputs best fitness, average better half fitness and average fitness of individuals with fitness greater 0

void evolve (double offspringrate=0.45, double crossormuta=0.4, double mutarate=0.3, double mutastrength=0.2, bool uniformNoise=false)
 does one step in evolution, you can use normal or uniform distributed noise for mutation


Public Attributes

T * individual [siz]

Detailed Description

template<class T, int siz>
class Population< T, siz >

Contains a population of parameter sets derived from class Individual.

Definition at line 22 of file Population.h.


Constructor & Destructor Documentation

template<class T, int siz>
Population< T, siz >::Population  )  [inline]
 

Constructor.

Definition at line 26 of file Population.h.

template<class T, int siz>
Population< T, siz >::~Population  )  [inline]
 

Destructor.

Definition at line 35 of file Population.h.


Member Function Documentation

template<class T, int siz>
T* Population< T, siz >::getNextIndividualWithoutFitness  )  [inline]
 

returns the next individual thats fitness was not tested before, or NULL if all individuals have a fitness

Definition at line 44 of file Population.h.

template<class T, int siz>
double Population< T, siz >::getBestFitness  )  [inline]
 

returns fitness of the best individual

Definition at line 57 of file Population.h.

template<class T, int siz>
void Population< T, siz >::outputStatistics OutTextRawFile file = 0  )  [inline]
 

outputs best fitness, average better half fitness and average fitness of individuals with fitness greater 0

Parameters:
file if an OutTextRawFile is given, output will be appended there too

Definition at line 73 of file Population.h.

template<class T, int siz>
void Population< T, siz >::evolve double  offspringrate = 0.45,
double  crossormuta = 0.4,
double  mutarate = 0.3,
double  mutastrength = 0.2,
bool  uniformNoise = false
[inline]
 

does one step in evolution, you can use normal or uniform distributed noise for mutation

Definition at line 128 of file Population.h.


Member Data Documentation

template<class T, int siz>
T* Population< T, siz >::individual[siz]
 

Definition at line 183 of file Population.h.

Referenced by operator>>().


The documentation for this class was generated from the following file:
Generated on Thu Sep 23 20:10:43 2004 for GT2004 by doxygen 1.3.6