refactor: add eoOperatorFoundry

- Simpler relationships between encoding and set of operators in foundry.
- Rename "instanciate" in "instantiate"
This commit is contained in:
Johann Dreo 2020-05-03 15:31:25 +02:00
commit ae81793f7c
8 changed files with 193 additions and 112 deletions

View file

@ -77,11 +77,11 @@ int main(int /*argc*/, char** /*argv*/)
pop.append(pop_size, init);
eval(pop,pop);
foundry.at(foundry.index_of.continuators) = i_cont;
foundry.at(foundry.index_of.crossovers) = i_cross;
foundry.at(foundry.index_of.mutations) = i_mut;
foundry.at(foundry.index_of.selectors) = i_sel;
foundry.at(foundry.index_of.replacements) = i_rep;
foundry.at(foundry.continuators.index()) = i_cont;
foundry.at(foundry.crossovers.index()) = i_cross;
foundry.at(foundry.mutations.index()) = i_mut;
foundry.at(foundry.selectors.index()) = i_sel;
foundry.at(foundry.replacements.index()) = i_rep;
// Or, if you know the order.
foundry.select({i_cont, i_cross, i_mut, i_sel, i_rep});