Logo Search packages:      
Sourcecode: gaffitter version File versions  Download package

GeneticAlgorithm Class Reference

#include <GeneticAlgorithm.hh>

Inheritance diagram for GeneticAlgorithm:


List of all members.

Detailed Description

This class implements a Genetic Algorithm system as search algorithm. This implementation aims to minimize the distance between a candidate solution and the specified target.

Definition at line 124 of file GeneticAlgorithm.hh.

Public Member Functions

void Evolve ()
 GeneticAlgorithm (vector< SizeName > &, Params &)
bool Output ()
 ~GeneticAlgorithm ()

Protected Member Functions

Params::Size_t CalcSum (const vector< bool > &) const
bool CopyMutate (bool gene) const
Params::Size_t Diff (const vector< bool > &v) const
Params::Size_t Diff (Params::Size_t s) const
void DirectedMutation (Genome &g) const
Params::Size_t Evaluate (const vector< bool > &v) const
bool Generation ()
void Initialize ()
void InitPopulation ()
void LocalOptimizer (Genome &) const
void Reproduction (int, int, int, int) const
void Reset ()
Params::Size_t Score (const Genome &g) const
Params::Size_t Score (int index) const
int Select (int a, int b, int p) const
int Select (int a, int b) const
pair< int, int > Tournament2 (int, int) const
pair< int, int > TournamentN (int, int) const
ostream & Write (ostream &) const

Protected Attributes

vector< bool > * m_best
vector< SizeName > & m_files
vector< Genome * > m_genomes
unsigned m_num_gen
unsigned m_pop_size
float m_prob_crossover
float m_prob_mutation
unsigned m_tournament_size
pair< int, int >
Tournament )(int, int) const

Private Member Functions

 GeneticAlgorithm (const GeneticAlgorithm &)
float NonUniformFiller (float) const
GeneticAlgorithmoperator= (const GeneticAlgorithm &)

Private Attributes

unsigned m_cur_gen


ostream & operator<< (ostream &, const Optimizer &)

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

Generated by  Doxygen 1.6.0   Back to index