ECF 1.5
SelFitnessProportionalOp.h
1#ifndef SelFitnessProportionalOp_h
2#define SelFitnessProportionalOp_h
3
4#include "SelectionOperator.h"
5
27{
28protected:
29 double selPressure_;
30
31public:
32 bool initialize(StateP);
33
34 IndividualP select(const std::vector<IndividualP>&);
35
37 std::vector<IndividualP> selectMany(const std::vector<IndividualP>&, uint);
38
40 bool setSelPressure(double);
41
42};
43typedef boost::shared_ptr<SelFitnessProportionalOp> SelFitnessProportionalOpP;
44
45#endif // SelFitnessProportionalOp_h
46
Fitness proportional (and inverse proportional) individual selection operator.
IndividualP select(const std::vector< IndividualP > &)
Select one individual from a set.
double selPressure_
the ratio of selection probability of the best and worst individual in the set
bool initialize(StateP)
Selection operator initialization. Must be called before individual selection.
std::vector< IndividualP > selectMany(const std::vector< IndividualP > &, uint)
Repeatedly select from the same pool (duplicates allowed)
bool setSelPressure(double)
Set selection pressure value.
Selection operator base class.