Template Class base

Inheritance Relationships

Base Types

  • public ProblemType

  • public std::vector< std::shared_ptr< ProblemType > >

  • public ioh::suite::abstract_suite (Class abstract_suite)

Class Documentation

template<typename ProblemType>
class ioh::suite::base : public ProblemType, public std::vector<std::shared_ptr<ProblemType>>, public ioh::suite::abstract_suite

A base class for construct a suite for sets of problem::bases.

To specify available problems of a suite, registerProblem must be implemented in derived class. The default lable of problems are string type. Integer type are also optional, but we highly recommond registering problem with string lable and creating a map of string problem_name and integer problem_id.

Public Types

typedef std::shared_ptr<ProblemType> problem_ptr

Public Functions

base(std::vector<int> problem_id = std::vector<int>(0), std::vector<int> instance_id = std::vector<int>(0), std::vector<int> dimension = std::vector<int>(0))
base(const base&) = delete
base &operator=(const base&) = delete
void register_problems()
void load_problem()
problem_ptr get_next_problem()

An interface of requesting problems in suite.

To request a specific problem with corresponding problem_id, instance_id and dimension, without concerning the order of testing problems.

problem_ptr get_current_problem()
template<typename P, typename T>
void register_problem(const std::string name, const int id)
void check_parameter_bounds(std::vector<int> ids, const int lb, const int ub)
problem_ptr get_problem(std::string problem_name, int instance, int dimension)
problem_ptr get_problem(int problem_id, int instance, int dimension)
int get_number_of_problems() const
int get_number_of_instances() const
int get_number_of_dimensions() const
std::vector<int> get_problem_id() const
std::map<int, std::string> get_problem_name() const
std::map<std::string, int> get_problems() const

Return a map of problem name to problem ID, for all the registered problem.

std::vector<int> get_instance_id() const
std::vector<int> get_dimension() const
std::string get_suite_name() const
void set_suite_problem_id(const std::vector<int> &problem_id)
void set_suite_instance_id(const std::vector<int> &instance_id)
void set_suite_dimension(const std::vector<int> &dimension)
void set_suite_name(std::string suite_name)
void mapIDTOName(int id, std::string name)