25 #ifndef PAGMO_PROBLEM_BASE_TSP_H
26 #define PAGMO_PROBLEM_BASE_TSP_H
31 #include "../serialization.h"
32 #include "../population.h"
34 namespace pagmo {
namespace problem {
74 base_tsp(
int n_cities,
int nc,
int nic, encoding_type = CITIES);
78 encoding_type get_encoding()
const;
79 decision_vector::size_type get_n_cities()
const;
91 virtual double distance(decision_vector::size_type, decision_vector::size_type)
const = 0;
94 friend class boost::serialization::access;
95 template <
class Archive>
96 void serialize(Archive &ar,
const unsigned int)
98 ar & boost::serialization::base_object<base>(*this);
99 ar &
const_cast<encoding_type &
>(m_encoding);
100 ar &
const_cast<pagmo::decision_vector::size_type &
>(m_n_cities);
104 const encoding_type m_encoding;
105 const pagmo::decision_vector::size_type m_n_cities;
112 #endif //PAGMO_PROBLEM_BASE_TSP_H
std::vector< double > decision_vector
Decision vector type.
encoding_type
Mechanism used to encode the sequence of vertices to be visited.
Base TSP (Travelling Salesman Problem).