00001 00020 #ifndef _ICROSS_H 00021 00022 #define _ICROSS_H 1 00023 00024 #include "domain.h" 00025 #include "individual.h" 00026 #include "random.h" 00027 #include "running.h" 00028 #include "signal.h" 00029 00030 namespace realea { 00041 class ICrossBinary : public IReset { 00042 public: 00048 void setDomain(DomainRealPtr domain) { 00049 m_domain = domain; 00050 } 00051 00057 void setRandom(RandomPtr random) { 00058 m_random = random; 00059 } 00060 00066 void setRunning(RunningPtr running) { 00067 m_running = running; 00068 } 00069 00080 virtual void operator()(const tChromosomeReal &mom, tFitness fit_mom, const tChromosomeReal &dad, tFitness fit_dad, tChromosomeReal &child)=0; 00081 00082 00083 protected: 00084 DomainRealPtr m_domain; 00085 RandomPtr m_random; 00086 RunningPtr m_running; 00087 }; 00088 00089 typedef ICrossBinary* ICrossBinaryPtr; 00090 } 00091 00092 #endif