X-Git-Url: https://git.dlugolecki.net.pl/?p=genetic.git;a=blobdiff_plain;f=include%2Fmutation%2Fmutation.h;h=ffd7d6384c696dd3ef9461d7e24a8389c0510c87;hp=a35b312b60d637359e7e5d028c79be6bdd5a730e;hb=917440678dc4e920dfd5810da1274665acb17138;hpb=c7bf950f7db8b2e5843fbead4851d80202570af2 diff --git a/include/mutation/mutation.h b/include/mutation/mutation.h index a35b312..ffd7d63 100644 --- a/include/mutation/mutation.h +++ b/include/mutation/mutation.h @@ -19,7 +19,7 @@ namespace genetic { /** * Type of probability of mutation chance */ - typedef double MutationChanceType; + typedef float MutationChanceType; /** * Type representing Chromosome Gene @@ -48,7 +48,7 @@ namespace genetic { * @param _generation Generation for which the mutation should be applied * @return new Generation of Chromosome's that passed the mutation */ - Generation<_Chromosome> mutate(Generation<_Chromosome> _generation) { + Generation<_Chromosome> mutate(Generation<_Chromosome>& _generation) { const unsigned int generationSize = _generation.size(); const unsigned int chromosomeSize = _generation[0].size(); vector<_Chromosome> newGeneration;