00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <eoSGA.h>
00022 #include <eoEasyEA.h>
00023 #include <eoDetSelect.h>
00024 #include <eoCellularEasyEA.h>
00025
00026 #include "PyEO.h"
00027 #include "def_abstract_functor.h"
00028
00029 using namespace boost::python;
00030
00031 void algos()
00032 {
00033 def_abstract_functor<eoAlgo<PyEO> >("eoAlgo");
00034
00035
00036 class_<eoSGA<PyEO>, bases<eoAlgo<PyEO> >, boost::noncopyable>("eoSGA",
00037 init<eoSelectOne<PyEO>&,
00038 eoQuadOp<PyEO>&, float,
00039 eoMonOp<PyEO>&, float,
00040 eoEvalFunc<PyEO>&,
00041 eoContinue<PyEO>&>()
00042 [
00043 with_custodian_and_ward<1,2,
00044 with_custodian_and_ward<1,3,
00045 with_custodian_and_ward<1,5,
00046 with_custodian_and_ward<1,7,
00047 with_custodian_and_ward<1,8>
00048 >
00049 >
00050 >
00051 >()
00052 ])
00053 .def("__call__", &eoSGA<PyEO>::operator())
00054 ;
00055
00056 class_<eoEasyEA<PyEO>, bases<eoAlgo<PyEO> > >("eoEasyEA",
00057 init<
00058 eoContinue<PyEO>&,
00059 eoEvalFunc<PyEO>&,
00060 eoBreed<PyEO>&,
00061 eoReplacement<PyEO>& >() )
00062 .def( init<
00063 eoContinue<PyEO>&,
00064 eoPopEvalFunc<PyEO>&,
00065 eoBreed<PyEO>&,
00066 eoReplacement<PyEO>&>() )
00067 .def( init<
00068 eoContinue<PyEO>&,
00069 eoEvalFunc<PyEO>&,
00070 eoBreed<PyEO>&,
00071 eoMerge<PyEO>&,
00072 eoReduce<PyEO>& >() )
00073 .def( init<
00074 eoContinue<PyEO>&,
00075 eoEvalFunc<PyEO>&,
00076 eoSelect<PyEO>&,
00077 eoTransform<PyEO>&,
00078 eoReplacement<PyEO>&>())
00079 .def( init<
00080 eoContinue<PyEO>&,
00081 eoEvalFunc<PyEO>&,
00082 eoSelect<PyEO>&,
00083 eoTransform<PyEO>&,
00084 eoMerge<PyEO>&,
00085 eoReduce<PyEO>&>())
00086 .def("__call__", &eoEasyEA<PyEO>::operator())
00087 ;
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 }