adding eoGeneration
This commit is contained in:
parent
c1481ac24f
commit
c1cddf3236
5 changed files with 91 additions and 100 deletions
|
|
@ -1,43 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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