11 #ifndef DIGNEA_SELFACTORY_H
12 #define DIGNEA_SELFACTORY_H
14 #include <dignea/core/Selection.h>
15 #include <dignea/core/Solution.h>
27 map<SelType, function<unique_ptr<Selection<S>>()>> factories;
31 factories[SelType::Binary] = [] {
32 return make_unique<BinaryTournamentSelection<S>>();
41 unique_ptr<Selection<S>>
create(
SelType type) {
return factories[type](); }
SelType
Types of Selection Operators implemented in dignea.
Definition: SelectionTypes.h:19
Selection factory which allows the user to create Selection Operators easily.
Definition: SelFactory.h:25
unique_ptr< Selection< S > > create(SelType type)
Creates a unique pointer to a Selection Operator of type.
Definition: SelFactory.h:41