X-Git-Url: https://git.dlugolecki.net.pl/?p=genetic.git;a=blobdiff_plain;f=include%2Fcondition%2Fcondition.h;h=2b175751fb66d15510ae3380d36d28b7c0a8102c;hp=eea77d593accd1210719ce14db78882042505394;hb=0c268e96035b65112e449c1c0df49f2be3eb184f;hpb=917440678dc4e920dfd5810da1274665acb17138 diff --git a/include/condition/condition.h b/include/condition/condition.h index eea77d5..2b17575 100644 --- a/include/condition/condition.h +++ b/include/condition/condition.h @@ -24,7 +24,7 @@ namespace genetic { * @return true if condition is satisfied and another generation can checked; * false if condition is not satisfied and algorithm should stop. */ - virtual bool do_check(Generation<_Chromosome>&) = 0; + virtual bool do_check(const Generation<_Chromosome>&) = 0; public: /** @@ -36,7 +36,7 @@ namespace genetic { * @return true if condition is satisfied and another generation can checked; * false if condition is not satisfied and algorithm should stop. */ - bool check(Generation<_Chromosome>& generation) { + bool check(const Generation<_Chromosome>& generation) { return do_check(generation); } };