MS-RCPSP
Public Member Functions | List of all members
EvolutionaryAlgorithm::GeneticAlgorithm< T > Class Template Reference

Representation of genetic algorithm. Glues everything together. More...

#include <GeneticAlgorithm.h>

Inheritance diagram for EvolutionaryAlgorithm::GeneticAlgorithm< T >:
Inheritance graph
[legend]
Collaboration diagram for EvolutionaryAlgorithm::GeneticAlgorithm< T >:
Collaboration graph
[legend]

Public Member Functions

 GeneticAlgorithm (int pop_size, const std::shared_ptr< Selector< T >> &s, const std::shared_ptr< Crossover< T >> c, const std::shared_ptr< Mutator< T >> &m, int _steps=-1, bool _rem_clones=true)
 
std::shared_ptr< T > optimize (FILE *stream)
 
std::shared_ptr< T > optimize () override
 

Detailed Description

template<class T>
class EvolutionaryAlgorithm::GeneticAlgorithm< T >

Representation of genetic algorithm. Glues everything together.

Parameters
TType of specimen representation, subclass of Schedule.

Definition at line 27 of file GeneticAlgorithm.h.

Constructor & Destructor Documentation

template<class T >
EvolutionaryAlgorithm::GeneticAlgorithm< T >::GeneticAlgorithm ( int  pop_size,
const std::shared_ptr< Selector< T >> &  s,
const std::shared_ptr< Crossover< T >>  c,
const std::shared_ptr< Mutator< T >> &  m,
int  _steps = -1,
bool  _rem_clones = true 
)
Parameters
pop_sizeSize of the population.
sSelection operator.
cCrossover operator.
mMutation operator.

Member Function Documentation

template<class T >
std::shared_ptr<T> EvolutionaryAlgorithm::GeneticAlgorithm< T >::optimize ( FILE *  stream)

Executes the genetic algorithm.

Parameters
streamFile stream for statistics output.
Returns
The most adapted specimen in all populations (best solution found).

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