ECF 1.5
SelectionOperator.h
1#ifndef SelectionOperator_h
2#define SelectionOperator_h
3
4#include "State.h"
5#include "Individual.h"
6
7
19{
20protected:
21 StateP state_;
22public:
23 virtual ~SelectionOperator()
24 { }
25
30 virtual bool initialize(StateP) = 0;
31
33 virtual IndividualP select(const std::vector<IndividualP>&) = 0;
34
35};
36typedef boost::shared_ptr<SelectionOperator> SelectionOperatorP;
37
38#endif // SelectionOperator_h
39
Selection operator base class.
virtual IndividualP select(const std::vector< IndividualP > &)=0
Select one individual from a set.
virtual bool initialize(StateP)=0
Selection operator initialization. Must be called before individual selection.