Well, what do you know, major commit.
Changed the signature of eoMon, eoBin and eoQuadOp to return a bool, without invalidating fitness. Added a set of invalidators to take over that job (see for instance eoSGA and eoSGATransform how this can transparantly used) Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong) Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore) and of course changed all the operators to reflect the change (and found a few that didn't invalidate the fitness, thus really pointing out the advantage of the current approach)
This commit is contained in:
parent
17d55ae92b
commit
3a9b5a0e7e
30 changed files with 651 additions and 564 deletions
|
|
@ -196,7 +196,7 @@ template <class Procedure>
|
|||
eoProcedureCounter<Procedure>& make_counter(eoFunctorBase::procedure_tag, Procedure& _proc, eoFunctorStore& store, std::string _name = "proc_counter")
|
||||
{
|
||||
eoProcedureCounter<Procedure>* result = new eoProcedureCounter<Procedure>(_proc, _name);
|
||||
store.add(result);
|
||||
store.storeFunctor(result);
|
||||
return *result;
|
||||
}
|
||||
|
||||
|
|
@ -204,7 +204,7 @@ template <class UnaryFunctor>
|
|||
eoUnaryFunctorCounter<UnaryFunctor>& make_counter(eoFunctorBase::unary_function_tag, UnaryFunctor& _proc, eoFunctorStore& store, std::string _name = "uf_counter")
|
||||
{
|
||||
eoUnaryFunctorCounter<UnaryFunctor>* result = new eoUnaryFunctorCounter<UnaryFunctor>(_proc, _name);
|
||||
store.add(result);
|
||||
store.storeFunctor(result);
|
||||
return *result;
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ template <class BinaryFunctor>
|
|||
eoBinaryFunctorCounter<BinaryFunctor>& make_counter(eoFunctorBase::binary_function_tag, BinaryFunctor& _proc, eoFunctorStore& store, std::string _name = "uf_counter")
|
||||
{
|
||||
eoBinaryFunctorCounter<BinaryFunctor>* result = new eoBinaryFunctorCounter<BinaryFunctor>(_proc, _name);
|
||||
store.add(result);
|
||||
store.storeFunctor(result);
|
||||
return *result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue