1 #ifndef FAIF_SEARCH_EM_H 2 #define FAIF_SEARCH_EM_H 17 typedef typename Space::Individual Individual;
29 typedef typename Space::Individual Individual;
33 return Space::expectation(p);
42 typedef typename Space::Individual Individual;
54 typedef typename Space::Individual Individual;
58 return Space::maximization(p);
68 template<
typename Space,
77 typedef typename Space::Individual Individual;
78 typedef typename Space::Fitness Fitness;
83 Individual&
solve(Individual& init, StopCondition stop = StopCondition() ) {
88 Individual& current(init);
90 while( !stop.isFinished() ) {
91 Expectation<Space>::expectation(current);
92 Maximization<Space>::maximization(current);
102 #endif // FAIF_SEARCH_EM_H maximization policy (empty) n
Definition: ExpectationMaximization.hpp:40
static Individual & expectation(Individual &p)
expectation calls the method from template parameter
Definition: ExpectationMaximization.hpp:32
the Expectation-Maximization algorithm
Definition: ExpectationMaximization.hpp:73
maximization policy - custiom
Definition: ExpectationMaximization.hpp:52
static Individual & expectation(Individual &p)
expectation is an empty operation
Definition: ExpectationMaximization.hpp:20
static Individual & maximization(Individual &p)
expectation calls the method from template parameter
Definition: ExpectationMaximization.hpp:57
the typedef-s for space, where the fitness is defined as double
Definition: Space.hpp:25
Stop condition, finish the algorithm after STEPS_NUM iterations.
Definition: Space.hpp:46
expectation policy (empty)
Definition: ExpectationMaximization.hpp:15
the concept for space with fitness
Definition: Space.hpp:33
static Individual & maximization(Individual &p)
expectation is an empty operation
Definition: ExpectationMaximization.hpp:45
expectation policy - custiom
Definition: ExpectationMaximization.hpp:27
Individual & solve(Individual &init, StopCondition stop=StopCondition())
the evolutionary algorithm - until stop repeat mutation, cross-over, selection, succession. Modifies the initial population.
Definition: ExpectationMaximization.hpp:83