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

ostream & GeneticAlgorithm::Write ( ostream &  s  )  const [protected, virtual]

Writes some information (like algorithm name and parameters) in ostream object (usually cout).

Reimplemented from Optimizer.

Definition at line 435 of file GeneticAlgorithm.cc.

References Params::m_ga_seed, m_num_gen, Optimizer::m_params, m_pop_size, m_prob_crossover, m_prob_mutation, m_tournament_size, and Optimizer::Write().

{
   s << endl;
   s << "> -----------------------------------" << endl;
   s << "> Genetic Algorithm (steady-state)" << endl;
   s << "> -----------------------------------" << endl;
   s << "> Max number of generations: " << m_num_gen << endl;
   s << "> Population size: " << m_pop_size << endl;
   s << "> Crossover probability: " << m_prob_crossover << endl;
   s << "> Mutation probability: " << m_prob_mutation << endl;
   s << "> Tournament size: " << m_tournament_size << endl;
   s << "> Seed: " << m_params.m_ga_seed << endl;

   Optimizer::Write(s);

   s << flush << endl;

   return s;
}


Generated by  Doxygen 1.6.0   Back to index