X-Git-Url: https://git.dlugolecki.net.pl/?p=genetic.git;a=blobdiff_plain;f=include%2Ffitness%2Fwsti.h;h=e33aa798c316b3c94483dbf208ec6c6639fff9dd;hp=408cfada3e8f0f60ff75fc50e6c7abbc3bd1957a;hb=0c268e96035b65112e449c1c0df49f2be3eb184f;hpb=917440678dc4e920dfd5810da1274665acb17138 diff --git a/include/fitness/wsti.h b/include/fitness/wsti.h index 408cfad..e33aa79 100644 --- a/include/fitness/wsti.h +++ b/include/fitness/wsti.h @@ -64,7 +64,7 @@ namespace genetic { * * @param _chromosome Chromosome, for which value will be calculated */ - WSTI(_Chromosome& _chromosome) + WSTI(const _Chromosome& _chromosome) : Fitness<_Chromosome>(_chromosome) { } @@ -85,7 +85,7 @@ namespace genetic { * @param start begining of the Fitness function domain * @param end end of the Fitness function domain */ - WSTI(_Chromosome& _chromosome, float start, float end) + WSTI(const _Chromosome& _chromosome, float start, float end) : Fitness<_Chromosome>(_chromosome), span_start(start), span_end(end) { } @@ -100,7 +100,7 @@ namespace genetic { * @param args map containing span_start and span_end as a keys and * their values (_double_) passed as strings */ - virtual void parseArguments(std::map args) { + virtual void parseArguments(std::map& args) { std::map::iterator it; for (it = args.begin(); it != args.end(); it++) { if (it->first == "span_start") {