objective#

Types#

Transformation#

using ioh::problem::transformation::objective::Transformation = std::function<double(double, double)>#

Functions#

exclusive_or#

inline int ioh::problem::transformation::objective::exclusive_or(const int x1, const int x2)#

Exclusive or operation on two integers, which should either be 0 or 1.

Parameters:
  • x1 – first operand

  • x2 – second operand

Returns:

the result of xor

oscillate#

inline double ioh::problem::transformation::objective::oscillate(const double y, const double factor = 0.1)#

oscillates the value for y

Parameters:
  • y – the raw y value

  • factor – the factor of oscillation

Returns:

the transformed y value

penalize#

inline double ioh::problem::transformation::objective::penalize(const std::vector<double> &x, const double lb, const double ub, const double factor, const double y)#

penalizes the objective value for x when it is out of bounds, weighed by a constant factor

Parameters:
  • x – the object in the search space

  • lb – the lower bound

  • ub – the upper bound

  • factor – the weight

  • y – the raw y value

Returns:

the penalized y value

scale#

inline double ioh::problem::transformation::objective::scale(const double y, const double offset)#

Scale a double y with a given offset.

Parameters:
  • y – the raw value

  • offset – the offset to scale by

Returns:

the scaled objective value

shift#

inline double ioh::problem::transformation::objective::shift(const double y, const double offset)#

Shift a double y with a given offset.

Parameters:
  • y – the raw value

  • offset – the offset to shift by

Returns:

the shifted objective value

uniform#

inline double ioh::problem::transformation::objective::uniform(const Transformation &t, const double y, const int seed, const double lb, const double ub)#

applies a given transformation method t(double y, double a) with a random number for a.

Parameters:
  • t – A transformation method

  • y – the raw y value

  • seed – the seed for the uniform random number generator

  • lb – the lower bound for the random number

  • ub – the upper bound for the random number

Returns:

the transformed y value