#include "chromosome.h"
#include "generation.h"
-using namespace std;
-
namespace genetic {
/**
* Base Condition class.
* @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:
/**
* @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);
}
};