/**
* Type of probability of crossover chance
*/
- typedef double CrossoverChanceType;
+ typedef float CrossoverChanceType;
/**
* Type representing Chromosome Gene
* @param splitPlace Gene number on which the Genes should be swapped
* @return new Chromosome crossed between given two
*/
- _Chromosome do_cross(_Chromosome first, _Chromosome second, unsigned int splitPlace) {
+ _Chromosome do_cross(_Chromosome& first, _Chromosome& second, unsigned int splitPlace) {
const unsigned int chromosomeSize = first.size();
// cout << " ";
* @param _generation Generation for which the crossover should be applied
* @return new Generation of Chromosome's after the Crossover
*/
- Generation<_Chromosome> cross(Generation<_Chromosome> _generation) {
+ Generation<_Chromosome> cross(Generation<_Chromosome>& _generation) {
const unsigned int generationSize = _generation.size();
vector<_Chromosome> newGeneration;