25 #ifndef PAGMO_PROBLEM_BASE_META_H
26 #define PAGMO_PROBLEM_BASE_META_H
30 #include "../serialization.h"
35 namespace pagmo{
namespace problem {
54 base_meta(
const base &p =
ackley(1),
int n=1,
int ni=0,
int nf=1,
int nc=0,
int nic=0,
const std::vector<double>&c_tol = std::vector<double>()):
55 base(n,ni,nf,nc,nic,c_tol), m_original_problem(p.clone()) {
57 set_bounds(m_original_problem->get_lb(),m_original_problem->get_ub());
63 {
return m_original_problem->compare_fitness_impl(f1,f2);}
67 {
return m_original_problem->compare_constraints_impl(c1,c2);}
69 {
return m_original_problem->compare_fc_impl(f1,c1,f2,c2);}
71 friend class boost::serialization::access;
72 template <
class Archive>
73 void serialize(Archive &ar,
const unsigned int)
75 ar & boost::serialization::base_object<base>(*this);
76 ar & m_original_problem;
87 #endif // PAGMO_PROBLEM_BASE_META_H
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > fitness_vector
Fitness vector type.
std::vector< double > constraint_vector
Constraint vector type.