feat: add an eoAlgoFoundry interface
Mainly expose the "algo = encoding" entrface.
This commit is contained in:
parent
ccb6bbed7c
commit
412e054933
2 changed files with 70 additions and 16 deletions
|
|
@ -76,10 +76,10 @@
|
|||
* @ingroup Algorithms
|
||||
*/
|
||||
template<class EOT>
|
||||
class eoAlgoFoundryEA : public eoAlgo<EOT>
|
||||
class eoAlgoFoundryEA : public eoAlgoFoundry<EOT,5>
|
||||
{
|
||||
public:
|
||||
static const size_t dim = 5;
|
||||
using eoAlgoFoundry<EOT,5>::dim;
|
||||
|
||||
struct Indices
|
||||
{
|
||||
|
|
@ -104,20 +104,6 @@ class eoAlgoFoundryEA : public eoAlgo<EOT>
|
|||
_encoding = { 0 }; // dim * 0
|
||||
}
|
||||
|
||||
/** Access to the index of the currently selected operator.
|
||||
*/
|
||||
size_t& at(size_t i)
|
||||
{
|
||||
return _encoding.at(i);
|
||||
}
|
||||
|
||||
/** Select indices of all the operators.
|
||||
*/
|
||||
void operator=( std::array<size_t,dim> a)
|
||||
{
|
||||
_encoding = a;
|
||||
}
|
||||
|
||||
/* Operators containers @{ */
|
||||
eoForgeVector< eoContinue<EOT> > continuators;
|
||||
eoForgeVector< eoQuadOp<EOT> > crossovers;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue