* indentations + whitespace cleanup
This commit is contained in:
parent
8457e39efe
commit
56c6edab04
285 changed files with 6068 additions and 6223 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
PyEO
|
||||
|
||||
|
||||
Copyright (C) 2003 Maarten Keijzer
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -31,76 +31,96 @@ using namespace boost::python;
|
|||
void algos()
|
||||
{
|
||||
def_abstract_functor<eoAlgo<PyEO> >("eoAlgo");
|
||||
|
||||
|
||||
/* Algorithms */
|
||||
class_<eoSGA<PyEO>, bases<eoAlgo<PyEO> >, boost::noncopyable>("eoSGA",
|
||||
init<eoSelectOne<PyEO>&,
|
||||
eoQuadOp<PyEO>&, float,
|
||||
eoMonOp<PyEO>&, float,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoContinue<PyEO>&>()
|
||||
[
|
||||
with_custodian_and_ward<1,2,
|
||||
with_custodian_and_ward<1,3,
|
||||
with_custodian_and_ward<1,5,
|
||||
with_custodian_and_ward<1,7,
|
||||
with_custodian_and_ward<1,8>
|
||||
>
|
||||
>
|
||||
>
|
||||
>()
|
||||
])
|
||||
.def("__call__", &eoSGA<PyEO>::operator())
|
||||
;
|
||||
|
||||
class_<eoEasyEA<PyEO>, bases<eoAlgo<PyEO> > >("eoEasyEA",
|
||||
init<
|
||||
eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoBreed<PyEO>&,
|
||||
eoReplacement<PyEO>& >() )
|
||||
.def( init<
|
||||
eoContinue<PyEO>&,
|
||||
eoPopEvalFunc<PyEO>&,
|
||||
eoBreed<PyEO>&,
|
||||
eoReplacement<PyEO>&>() )
|
||||
.def( init<
|
||||
eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoBreed<PyEO>&,
|
||||
eoMerge<PyEO>&,
|
||||
eoReduce<PyEO>& >() )
|
||||
.def( init<
|
||||
eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoSelect<PyEO>&,
|
||||
eoTransform<PyEO>&,
|
||||
eoReplacement<PyEO>&>())
|
||||
.def( init<
|
||||
eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoSelect<PyEO>&,
|
||||
eoTransform<PyEO>&,
|
||||
eoMerge<PyEO>&,
|
||||
eoReduce<PyEO>&>())
|
||||
.def("__call__", &eoEasyEA<PyEO>::operator())
|
||||
;
|
||||
|
||||
class_<eoSGA<PyEO>, bases<eoAlgo<PyEO> >, boost::noncopyable>
|
||||
("eoSGA",
|
||||
init<
|
||||
eoSelectOne<PyEO>&,
|
||||
eoQuadOp<PyEO>&,
|
||||
float,
|
||||
eoMonOp<PyEO>&,
|
||||
float,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoContinue<PyEO>&
|
||||
>()
|
||||
[
|
||||
with_custodian_and_ward<1,2,
|
||||
with_custodian_and_ward<1,3,
|
||||
with_custodian_and_ward<1,5,
|
||||
with_custodian_and_ward<1,7,
|
||||
with_custodian_and_ward<1,8>
|
||||
>
|
||||
>
|
||||
>
|
||||
>()
|
||||
]
|
||||
)
|
||||
.def("__call__", &eoSGA<PyEO>::operator())
|
||||
;
|
||||
|
||||
class_<eoEasyEA<PyEO>, bases<eoAlgo<PyEO> > >
|
||||
("eoEasyEA",
|
||||
init<
|
||||
eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoBreed<PyEO>&,
|
||||
eoReplacement<PyEO>&
|
||||
>()
|
||||
)
|
||||
.def( init<
|
||||
eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoBreed<PyEO>&,
|
||||
eoReplacement<PyEO>&,
|
||||
unsigned
|
||||
>() )
|
||||
.def( init<
|
||||
eoContinue<PyEO>&,
|
||||
eoPopEvalFunc<PyEO>&,
|
||||
eoBreed<PyEO>&,
|
||||
eoReplacement<PyEO>&
|
||||
>() )
|
||||
.def( init<
|
||||
eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoBreed<PyEO>&,
|
||||
eoMerge<PyEO>&,
|
||||
eoReduce<PyEO>&
|
||||
>() )
|
||||
.def( init<
|
||||
eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoSelect<PyEO>&,
|
||||
eoTransform<PyEO>&,
|
||||
eoReplacement<PyEO>&
|
||||
>() )
|
||||
.def( init<
|
||||
eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoSelect<PyEO>&,
|
||||
eoTransform<PyEO>&,
|
||||
eoMerge<PyEO>&,
|
||||
eoReduce<PyEO>&
|
||||
>() )
|
||||
.def("__call__", &eoEasyEA<PyEO>::operator())
|
||||
;
|
||||
|
||||
/*
|
||||
class_<eoCellularEasyEA<PyEO>, bases< eoAlgo<PyEO> > >("eoCellularEasyEA",
|
||||
init< eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoSelectOne<PyEO>&,
|
||||
eoBinOp<PyEO>&,
|
||||
eoMonOp<PyEO>&,
|
||||
eoSelectOne<PyEO>&>())
|
||||
.def(
|
||||
init< eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoSelectOne<PyEO>&,
|
||||
eoQuadOp<PyEO>&,
|
||||
eoMonOp<PyEO>&,
|
||||
eoSelectOne<PyEO>&>())
|
||||
;
|
||||
class_<eoCellularEasyEA<PyEO>, bases< eoAlgo<PyEO> > >("eoCellularEasyEA",
|
||||
init< eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoSelectOne<PyEO>&,
|
||||
eoBinOp<PyEO>&,
|
||||
eoMonOp<PyEO>&,
|
||||
eoSelectOne<PyEO>&>())
|
||||
.def(
|
||||
init< eoContinue<PyEO>&,
|
||||
eoEvalFunc<PyEO>&,
|
||||
eoSelectOne<PyEO>&,
|
||||
eoQuadOp<PyEO>&,
|
||||
eoMonOp<PyEO>&,
|
||||
eoSelectOne<PyEO>&>())
|
||||
;
|
||||
*/
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue