This commit is contained in:
commit
3fe0218a72
79 changed files with 12547 additions and 0 deletions
43
eo/src/eoGA.h
Normal file
43
eo/src/eoGA.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// eoGA.h
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef eoGA_h
|
||||
#define eoGA_h
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <eoPop.h> // eoPop
|
||||
#include <eoPopOps.h> // eoSelect, eoTranform, eoMerge
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// eoGA
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class eoGA
|
||||
{
|
||||
public:
|
||||
/// Constructor.
|
||||
eoGA(eoSelect& _select, eoTranform& _transform, eoMerge& _replace)
|
||||
{
|
||||
}
|
||||
|
||||
///
|
||||
void operator()(eoPop& pop)
|
||||
{
|
||||
eoPop breeders;
|
||||
|
||||
select(pop, breeders);
|
||||
transform(breeders);
|
||||
replace(breeders, pop);
|
||||
}
|
||||
|
||||
private:
|
||||
eoSelect& select;
|
||||
eoTranform& transform;
|
||||
eoMerge& replace;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif eoGA_h
|
||||
Loading…
Add table
Add a link
Reference in a new issue