Added a few "virtual" that were missing
This commit is contained in:
parent
64990a1ac4
commit
78f6c6ef3c
2 changed files with 8 additions and 4 deletions
|
|
@ -56,7 +56,7 @@ template<class EOT> class eoEvalFuncCounter : public eoEvalFunc<EOT>, public eoV
|
||||||
eoEvalFuncCounter(eoEvalFunc<EOT>& _func, std::string _name = "Eval. ")
|
eoEvalFuncCounter(eoEvalFunc<EOT>& _func, std::string _name = "Eval. ")
|
||||||
: eoValueParam<unsigned long>(0, _name), func(_func) {}
|
: eoValueParam<unsigned long>(0, _name), func(_func) {}
|
||||||
|
|
||||||
void operator()(EOT& _eo)
|
virtual void operator()(EOT& _eo)
|
||||||
{
|
{
|
||||||
if (_eo.invalid())
|
if (_eo.invalid())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,11 @@
|
||||||
|
|
||||||
template <class EOT>
|
template <class EOT>
|
||||||
class eoInit : public eoUF<EOT&, void>
|
class eoInit : public eoUF<EOT&, void>
|
||||||
{};
|
{
|
||||||
|
public:
|
||||||
|
virtual void operator()(EOT& chrom)
|
||||||
|
{ cout << "In the eoInit base class" << endl; }
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Initializer for fixed length representations with a single type
|
Initializer for fixed length representations with a single type
|
||||||
|
|
@ -58,7 +62,7 @@ class eoInitFixedLength: public eoInit<EOT>
|
||||||
eoInitFixedLength(unsigned _combien, eoRndGenerator<AtomType>& _generator)
|
eoInitFixedLength(unsigned _combien, eoRndGenerator<AtomType>& _generator)
|
||||||
: combien(_combien), generator(_generator) {}
|
: combien(_combien), generator(_generator) {}
|
||||||
|
|
||||||
void operator()(EOT& chrom)
|
virtual void operator()(EOT& chrom)
|
||||||
{
|
{
|
||||||
chrom.resize(combien);
|
chrom.resize(combien);
|
||||||
std::generate(chrom.begin(), chrom.end(), generator);
|
std::generate(chrom.begin(), chrom.end(), generator);
|
||||||
|
|
@ -85,7 +89,7 @@ class eoInitVariableLength: public eoInit<EOT>
|
||||||
throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize");
|
throw logic_error("eoInitVariableLength: minSize larger or equal to maxSize");
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator()(EOT& chrom)
|
virtual void operator()(EOT& chrom)
|
||||||
{
|
{
|
||||||
chrom.resize(offset + rng.random(extent));
|
chrom.resize(offset + rng.random(extent));
|
||||||
generate(chrom.begin(), chrom.end(), generator);
|
generate(chrom.begin(), chrom.end(), generator);
|
||||||
|
|
|
||||||
Reference in a new issue