move edo stuff, that was in the wriong place after the merge, in the edo directory
This commit is contained in:
parent
d4765851d5
commit
cbb1771dd6
77 changed files with 0 additions and 0 deletions
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef _Sphere_h
|
||||
#define _Sphere_h
|
||||
|
||||
#include <eo>
|
||||
#include <es.h>
|
||||
#include <es/eoRealInitBounded.h>
|
||||
#include <es/eoRealOp.h>
|
||||
#include <es/eoEsChromInit.h>
|
||||
#include <es/eoRealOp.h>
|
||||
#include <es/make_real.h>
|
||||
#include <apply.h>
|
||||
#include <eoProportionalCombinedOp.h>
|
||||
|
||||
template < typename EOT >
|
||||
class Sphere : public eoEvalFunc< EOT >
|
||||
{
|
||||
public:
|
||||
typedef typename EOT::AtomType AtomType;
|
||||
|
||||
virtual void operator()( EOT& p )
|
||||
{
|
||||
if (!p.invalid())
|
||||
return;
|
||||
|
||||
p.fitness( _evaluate( p ) );
|
||||
}
|
||||
|
||||
private:
|
||||
AtomType _evaluate( EOT& p )
|
||||
{
|
||||
AtomType r = 0.0;
|
||||
|
||||
for (unsigned int i = 0; i < p.size() - 1; ++i)
|
||||
{
|
||||
r += p[i] * p[i];
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !_Sphere_h
|
||||
Reference in a new issue