Skip to content

Commit

Permalink
move def of n_optima to assert for shubert
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdenobel committed May 6, 2024
1 parent 442b984 commit 17c403c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/ioh/problem/cec/2013/shubert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace ioh::problem

inline std::vector<Solution<double, SingleObjective>> get_optima(const int dimension)
{
const constexpr std::array<double, 6> coords = {-7.08350641, -0.8003211, 5.48286421,
constexpr std::array<double, 6> coords = {-7.08350641, -0.8003211, 5.48286421,
-7.70831374, -1.42512843, 4.85805688};


Expand Down Expand Up @@ -58,8 +58,7 @@ namespace ioh::problem
}
}
}
const size_t n_exp_optima = static_cast<size_t>(dimension * std::pow(3, dimension));
assert(n_exp_optima == result.size());
assert(static_cast<size_t>(dimension * std::pow(3, dimension)) == result.size());
return result;
}
} // namespace shubert
Expand Down

0 comments on commit 17c403c

Please sign in to comment.