00001 00025 //----------------------------------------------------------------------------- 00026 00027 #ifndef eoPopEvalFunc_H 00028 #define eoPopEvalFunc_H 00029 00030 #include <eoEvalFunc.h> 00031 #include <apply.h> 00032 00048 template<class EOT> 00049 class eoPopEvalFunc : public eoBF<eoPop<EOT> & , eoPop<EOT> &, void> 00050 {}; 00051 00053 // eoPopLoopEval 00055 00059 template<class EOT> 00060 class eoPopLoopEval : public eoPopEvalFunc<EOT> { 00061 public: 00063 eoPopLoopEval(eoEvalFunc<EOT> & _eval) : eval(_eval) {} 00064 00066 void operator()(eoPop<EOT> & _parents, eoPop<EOT> & _offspring) 00067 { 00068 apply<EOT>(eval, _offspring); 00069 } 00070 00071 private: 00072 eoEvalFunc<EOT> & eval; 00073 }; 00074 00076 // eoTimeVaryingLoopEval 00078 00083 template<class EOT> 00084 class eoTimeVaryingLoopEval : public eoPopEvalFunc<EOT> { 00085 public: 00087 eoTimeVaryingLoopEval(eoEvalFunc<EOT> & _eval) : eval(_eval) {} 00088 00090 void operator()(eoPop<EOT> & _parents, eoPop<EOT> & _offspring) 00091 { 00092 apply<EOT>(eval, _parents); 00093 apply<EOT>(eval, _offspring); 00094 } 00095 00096 private: 00097 eoEvalFunc<EOT> & eval; 00098 }; 00099 00100 #endif 00101