suite

Types

SuiteFactoryType

template<typename ProblemType>
using ioh::suite::SuiteFactoryType = common::Factory<Suite<ProblemType>, std::vector<int>, std::vector<int>, std::vector<int>>

Typedef for Suite factory type.

SuiteRegistry

template<class ProblemType>
using ioh::suite::SuiteRegistry = SuiteRegistryType<ProblemType>

Typedef for Suite factory.

SuiteRegistryType

template<typename ProblemType>
using ioh::suite::SuiteRegistryType = common::RegisterWithFactory<Suite<ProblemType>, std::vector<int>, std::vector<int>, std::vector<int>>

Typedef for Suite registry type.

Classes

Suite

template<typename ProblemType>
class Suite

Suite for ProblemType problems.

Public Types

using Problem = std::shared_ptr<ProblemType>

Typedef to ProblemType ptr.

using Factory = problem::ProblemFactoryType<ProblemType>

//! Typedef to ProblemType Factory

Public Functions

template<typename FactoryType = Factory>
inline Suite(const std::vector<int> &problem_ids, const std::vector<int> &instances, const std::vector<int> &dimensions, const std::string &name, const int max_instance = 1000, const int max_dimension = 1000, FactoryType &factory = Factory::instance())

Construct a new Suite object.

Parameters:
  • problem_ids – List of problem ids

  • instances – List of problem ids

  • dimensions – List of problem instances

  • name – The name of the suite

  • max_instance – the maximum instance

  • max_dimension – the maximum dimension

  • factory – the factory to take the problems from: this ProblemType’s, or one of a derived type

virtual ~Suite() = default
inline void reset()

reset all problems in the suite

inline void attach_logger(Logger &logger)

Attach a logger.

inline void detach_logger()

Detach a logger.

inline Iterator begin(const bool track_problems = true)

start iteration

inline Iterator end()

end iteration

inline std::vector<int> problem_ids() const

Accessor for problem_ids_.

inline std::vector<int> dimensions() const

Accessor for dimensions_.

inline std::vector<int> instances() const

Accessor for instances_.

inline std::string name() const

Accessor for name_.

inline size_t size() const

Accessor for size.

Private Functions

inline int check_parameter(const int parameter, const int ub, const int lb = 1) const

Check if parameter is within bounds.

Private Members

std::string name_

Name of the suite.

std::vector<Problem> problems_

List of problems.

std::vector<int> problem_ids_

List of problem ids.

std::vector<int> instances_

List of problem instances.

std::vector<int> dimensions_

List of problem dimensions.

Logger *logger_ = {}

Attached logger.

struct Iterator

Iterator for problems.

Public Types

using ValueType = typename std::vector<Problem>::value_type

Problem type.

using PointerType = ValueType*

Problem type *.

using ReferenceType = ValueType&

Problem type &.

Public Functions

inline explicit Iterator(PointerType p, Suite *s, const bool track_problems = true)

Construct a new Iterator object.

Parameters:
  • p – current ptr

  • s – suite ptr

  • track_problems – whether or not to track problems

inline void track_problem() const

Track the next problem.

inline Iterator &operator++()

Advance the iterator.

inline Iterator &operator++(int)

Advance the iterator.

inline ReferenceType operator[](int index)

Index.

inline PointerType operator->()

call

inline ReferenceType operator*()

call

inline bool operator==(const Iterator &other)

Comparison operator.

inline bool operator!=(const Iterator &other)

Comparison operator.

Public Members

Suite *suite

Suite ptr.

Private Members

PointerType ptr
PointerType begin
PointerType end
bool track_problems

Structs

BBOB

struct BBOB : public ioh::suite::Suite<problem::RealSingleObjective>

BBOB suite.

Public Functions

inline BBOB(const std::vector<int> &problem_ids = {}, const std::vector<int> &instances = {1}, const std::vector<int> &dimensions = {5})

Construct a new BBOB object.

Parameters:
  • problem_ids – List of problem ids

  • instances – List of problem instances (defaults to first instance)

  • dimensions – List of problem dimensions (defaults to 5D)

Public Static Attributes

static constexpr int registry_id = 2

The id in the suite registry.

static constexpr const char *registry_name = "BBOB"

The name in the suite registry, and of the suite.

Integer

struct Integer : public ioh::suite::Suite<problem::IntegerSingleObjective>

Integer suite.

Public Functions

inline Integer(const std::vector<int> &problem_ids, const std::vector<int> &instances, const std::vector<int> &dimensions)

Construct a new Integer object.

Parameters:
  • problem_ids – List of problem ids

  • instances – List of problem instances

  • dimensions – List of problem dimensions

Public Static Attributes

static constexpr int registry_id = 1

The id in the suite registry.

static constexpr const char *registry_name = "Integer"

The name in the suite registry, and of the suite.

IntegerStarDiscrepancy

struct IntegerStarDiscrepancy : public ioh::suite::Suite<problem::IntegerSingleObjective>

Public Functions

inline IntegerStarDiscrepancy(const std::vector<int> &problem_ids = {}, const std::vector<int> &instances = {1}, const std::vector<int> &dimensions = {5})

Construct a new StarDiscrepancy object.

Parameters:
  • problem_ids – List of problem ids

  • instances – List of problem instances (defaults to first instance)

  • dimensions – List of problem dimensions (defaults to 5D)

Public Static Attributes

static constexpr int registry_id = 4

The id in the suite registry.

static constexpr const char *registry_name = "IntegerStarDiscrepancy"

The name in the suite registry, and of the suite.

PBO

struct PBO : public ioh::suite::Suite<problem::IntegerSingleObjective>

PBO suite.

Public Functions

inline PBO(const std::vector<int> &problem_ids = {}, const std::vector<int> &instances = {1}, const std::vector<int> &dimensions = {16})

Construct a new PBO object.

Parameters:
  • problem_ids – List of problem ids

  • instances – List of problem instances (defaults to first instance)

  • dimensions – List of problem dimensions (defaults to 16D)

Public Static Attributes

static constexpr int registry_id = 2

The id in the suite registry.

static constexpr const char *registry_name = "PBO"

The name in the suite registry, and of the suite.

Real

struct Real : public ioh::suite::Suite<problem::RealSingleObjective>

Real suite.

Public Functions

inline Real(const std::vector<int> &problem_ids, const std::vector<int> &instances, const std::vector<int> &dimensions)

Construct a new RealSingleObjective object.

Parameters:
  • problem_ids – List of problem ids

  • instances – List of problem instances

  • dimensions – List of problem dimensions

Public Static Attributes

static constexpr int registry_id = 1

The id in the suite registry.

static constexpr const char *registry_name = "Real"

The name in the suite registry, and of the suite.

RealStarDiscrepancy

struct RealStarDiscrepancy : public ioh::suite::Suite<problem::RealSingleObjective>

Public Functions

inline RealStarDiscrepancy(const std::vector<int> &problem_ids = {}, const std::vector<int> &instances = {1}, const std::vector<int> &dimensions = {5})

Construct a new StarDiscrepancy object.

Parameters:
  • problem_ids – List of problem ids

  • instances – List of problem instances (defaults to first instance)

  • dimensions – List of problem dimensions (defaults to 5D)

Public Static Attributes

static constexpr int registry_id = 4

The id in the suite registry.

static constexpr const char *registry_name = "RealStarDiscrepancy"

The name in the suite registry, and of the suite.

SBOX

struct SBOX : public ioh::suite::Suite<problem::RealSingleObjective>

Public Functions

inline SBOX(const std::vector<int> &problem_ids = {}, const std::vector<int> &instances = {1}, const std::vector<int> &dimensions = {5})

Construct a new SBOX object.

Parameters:
  • problem_ids – List of problem ids

  • instances – List of problem instances (defaults to first instance)

  • dimensions – List of problem dimensions (defaults to 5D)

Public Static Attributes

static constexpr int registry_id = 3

The id in the suite registry.

static constexpr const char *registry_name = "SBOX"

The name in the suite registry, and of the suite.

Submodular

struct Submodular : public ioh::suite::Suite<problem::IntegerSingleObjective>

Submodular suite.

Public Functions

inline Submodular(const std::vector<int> &problem_ids = {}, const std::vector<int> &instances = {}, const std::vector<int> &dimensions = {})

Construct a new Submodular object.

Parameters:
  • problem_ids – List of problem ids

  • instances – List of problem instances (ignored)

  • dimensions – List of problem dimensions (ignored)

Public Static Attributes

static constexpr int registry_id = 3

The id in the suite registry.

static constexpr const char *registry_name = "Submodular"

The name in the suite registry, and of the suite.

Functions

register_suite

Warning

doxygenfunction: Unable to resolve function “ioh::suite::register_suite” with arguments None in doxygen xml output for project “iohcpp” from directory: ../../build/xml/. Potential matches:

- template<typename T> void register_suite()
- template<typename T> void register_suite(SuiteFactoryType<typename T::Problem::element_type> &factory)