Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages | Search for

# eoBreed.h

    00001
    00023 //-----------------------------------------------------------------------------
    00024
    00025 #ifndef _eoBreed_h
    00026 #define _eoBreed_h
    00027
    00028
    00029 //-----------------------------------------------------------------------------
    00030 #include <eoPop.h>
    00031 #include <eoFunctor.h>
    00032 #include <eoSelect.h>
    00033 #include <eoTransform.h>
    00034 //-----------------------------------------------------------------------------
    00035
    00045 template<class EOT>
    00046 class eoBreed : public eoBF<const eoPop<EOT>&, eoPop<EOT>&, void>
    00047 {};
    00048
    00049
    00050
    00056 template <class EOT>
    00057 class eoSelectTransform : public eoBreed<EOT>
    00058 {
    00059     public:
    00060         eoSelectTransform(eoSelect<EOT>& _select, eoTransform<EOT>& _transform) :
    00061         select(_select), transform(_transform)
    00062         {}
    00063
    00064         void operator()(const eoPop<EOT>& _parents, eoPop<EOT>& _offspring)
    00065         {
    00066             select(_parents, _offspring);
    00067             transform(_offspring);
    00068         }
    00069
    00070     private :
    00071         eoSelect<EOT>& select;
    00072         eoTransform<EOT>& transform;
    00073 };
    00074
    00075 #endif