ECF 1.5
TSPEvalOp.h
1#ifndef TSPEVALOP_H_
2#define TSPEVALOP_H_
3
4#include <cmath>
5#include <iostream>
6#include <string>
7#include <fstream>
8
9
32class TSPEvalOp : public EvaluateOp
33{
34private:
35 int dimension;
36 std::vector< std::vector<int> > weights;
37 std::vector< std::vector<double> > coordinates;
38public:
39 void registerParameters(StateP);
40 bool initialize(StateP);
41 FitnessP evaluate(IndividualP individual);
42};
43typedef boost::shared_ptr<TSPEvalOp> TSPEvalOpP;
44
45#endif /* TSPEVALOP_H_ */
Evaluation base class.
Definition: EvaluateOp.h:17
TSP evaluation operator.
Definition: TSPEvalOp.h:33
bool initialize(StateP)
Initialize the evaluator. Called before first evaluation occurs.
Definition: TSPEvalOp.cpp:15
void registerParameters(StateP)
Register evaluator parameters. Called before EvaluateOp::initialize method.
Definition: TSPEvalOp.cpp:9
FitnessP evaluate(IndividualP individual)
Evaluate a single individual. Method must create and return a Fitness object.
Definition: TSPEvalOp.cpp:114