|
1 | 1 | #pragma once |
2 | 2 |
|
| 3 | +#include "cecxx/functions/multimodal/schaffer.hpp" |
3 | 4 | #include <cecxx/benchmark/detail/legacy/functions/multimodal/bi_rastrigin.hpp> |
4 | | -#include <cecxx/benchmark/detail/legacy/functions/multimodal/schaffer.hpp> |
5 | 5 | #include <cecxx/benchmark/detail/problem_invokers/basic_problem_invoker.hpp> |
6 | 6 | #include <cecxx/functions/multimodal/ackley.hpp> |
7 | 7 | #include <cecxx/functions/multimodal/discus.hpp> |
|
23 | 23 | #include <cecxx/functions/unimodal/sum_diff_pow.hpp> |
24 | 24 |
|
25 | 25 | namespace cecxx::benchmark::cec_2017 { |
26 | | -static constexpr auto basic_1 = detail::basic_problem_invoker{ |
27 | | - cecxx::functions::unimodal::bent_cigar, 1.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
28 | | - |
29 | | -static constexpr auto basic_2 = detail::basic_problem_invoker{ |
30 | | - cecxx::functions::unimodal::sum_diff_pow, 1.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
31 | | - |
32 | | -static constexpr auto basic_3 = detail::basic_problem_invoker{ |
33 | | - cecxx::functions::unimodal::ellips, 1.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
34 | | - |
35 | | -static constexpr auto basic_4 = detail::basic_problem_invoker{ |
36 | | - cecxx::functions::multimodal::discus, 1.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
37 | | - |
38 | | -static constexpr auto basic_5 = detail::basic_problem_invoker{ |
39 | | - cecxx::functions::multimodal::zakharov, 1.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
40 | | - |
41 | | -static constexpr auto basic_6 |
| 26 | +static constexpr auto bent_cigar = detail::basic_problem_invoker{ |
| 27 | + cecxx::functions::unimodal::bent_cigar, |
| 28 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 29 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::rotation{}}}; |
| 30 | + |
| 31 | +static constexpr auto sum_diff_pow = detail::basic_problem_invoker{ |
| 32 | + cecxx::functions::unimodal::sum_diff_pow, |
| 33 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 34 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::rotation{}}}; |
| 35 | + |
| 36 | +static constexpr auto zakharov = detail::basic_problem_invoker{ |
| 37 | + cecxx::functions::multimodal::zakharov, |
| 38 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 39 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::rotation{}}}; |
| 40 | + |
| 41 | +static constexpr auto rosenbrock |
42 | 42 | = detail::basic_problem_invoker{cecxx::functions::multimodal::rosenbrock, |
43 | | - 2.048 / 100.0, |
44 | | - {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
45 | | - |
46 | | -static constexpr auto basic_7 |
47 | | - = detail::basic_problem_invoker{cecxx::functions::multimodal::rastrigin, |
48 | | - 5.12 / 100.0, |
49 | | - {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
50 | | - |
51 | | -static constexpr auto basic_8 = detail::basic_problem_invoker{ |
52 | | - cecxx::functions::multimodal::legacy::schaffer, 1.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
53 | | - |
54 | | -static constexpr auto basic_9 |
55 | | - = detail::basic_problem_invoker{cecxx::functions::multimodal::legacy::bi_rastrigin, |
56 | | - 1.0, |
57 | | - {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
58 | | - |
59 | | -static constexpr auto basic_10 |
| 43 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 44 | + std::tuple{ |
| 45 | + cecxx::benchmark::detail::shift{}, |
| 46 | + cecxx::benchmark::detail::scale{2.048, 100.0}, |
| 47 | + cecxx::benchmark::detail::rotation{}, |
| 48 | + detail::shift_by_scalar{1.0}, |
| 49 | + }}; |
| 50 | + |
| 51 | +static constexpr auto rastrigin = detail::basic_problem_invoker{ |
| 52 | + cecxx::functions::multimodal::rastrigin, |
| 53 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 54 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::rotation{}}}; |
| 55 | + |
| 56 | +static constexpr auto schaffer = detail::basic_problem_invoker{ |
| 57 | + cecxx::functions::multimodal::schaffer, |
| 58 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 59 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::scale{0.5, 100.0}, |
| 60 | + cecxx::benchmark::detail::rotation{}}}; |
| 61 | + |
| 62 | +static constexpr auto bi_rastrigin = detail::basic_problem_invoker{ |
| 63 | + cecxx::functions::multimodal::legacy::bi_rastrigin, |
| 64 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 65 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::scale{600.0, 100.0}, |
| 66 | + cecxx::benchmark::detail::rotation{}}}; |
| 67 | + |
| 68 | +static constexpr auto step_rastrigin |
60 | 69 | = detail::basic_problem_invoker{cecxx::functions::multimodal::step_rastrigin, |
61 | | - 5.12 / 100.0, |
62 | | - {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
63 | | - |
64 | | -static constexpr auto basic_11 = detail::basic_problem_invoker{ |
65 | | - cecxx::functions::multimodal::levy, 1.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
66 | | -static constexpr auto basic_12 = detail::basic_problem_invoker{ |
67 | | - cecxx::functions::multimodal::schwefel, 10.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
68 | | - |
69 | | -static constexpr auto basic_13 = detail::basic_problem_invoker{ |
70 | | - cecxx::functions::multimodal::ackley, 1.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
71 | | -static constexpr auto basic_14 = detail::basic_problem_invoker{ |
72 | | - cecxx::functions::multimodal::hgbat, 5.0 / 100.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
73 | | - |
74 | | -static constexpr auto basic_15 = detail::basic_problem_invoker{ |
75 | | - cecxx::functions::multimodal::happycat, 5.0 / 100.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
76 | | - |
77 | | -static constexpr auto basic_16 = detail::basic_problem_invoker{ |
78 | | - cecxx::functions::multimodal::escaffer, 1.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
79 | | -static constexpr auto basic_17 = detail::basic_problem_invoker{ |
80 | | - cecxx::functions::multimodal::katsuura, 5.0 / 100.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
81 | | - |
82 | | -static constexpr auto basic_18 |
83 | | - = detail::basic_problem_invoker{cecxx::functions::multimodal::grie_rosen, |
84 | | - 5.0 / 100.0, |
85 | | - {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
86 | | - |
87 | | -static constexpr auto basic_19 |
88 | | - = detail::basic_problem_invoker{cecxx::functions::multimodal::weierstrass, |
89 | | - 0.5 / 100.0, |
90 | | - {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
91 | | - |
92 | | -static constexpr auto basic_20 = detail::basic_problem_invoker{ |
93 | | - cecxx::functions::multimodal::griewank, 6.0, {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}}; |
| 70 | + {.rot = do_affine_trans::no, .shift = do_affine_trans::yes}, |
| 71 | + std::tuple{ |
| 72 | + cecxx::benchmark::detail::shift{}, |
| 73 | + cecxx::benchmark::detail::scale{5.12 / 100.0, 1.0}, |
| 74 | + }}; |
| 75 | + |
| 76 | +static constexpr auto levy = detail::basic_problem_invoker{ |
| 77 | + cecxx::functions::multimodal::levy, |
| 78 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 79 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::scale{5.12, 100.0}, |
| 80 | + cecxx::benchmark::detail::rotation{}}}; |
| 81 | + |
| 82 | +static constexpr auto schwefel |
| 83 | + = detail::basic_problem_invoker{cecxx::functions::multimodal::schwefel, |
| 84 | + {.rot = do_affine_trans::no, .shift = do_affine_trans::yes}, |
| 85 | + std::tuple{ |
| 86 | + cecxx::benchmark::detail::shift{}, |
| 87 | + cecxx::benchmark::detail::scale{1000.0 / 100.0, 1.0}, |
| 88 | + cecxx::benchmark::detail::shift_by_scalar{4.209687462275036e+002}, |
| 89 | + }}; |
| 90 | +static constexpr auto ellips = detail::basic_problem_invoker{ |
| 91 | + cecxx::functions::unimodal::ellips, |
| 92 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 93 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::rotation{}}}; |
| 94 | + |
| 95 | +static constexpr auto hgbat = detail::basic_problem_invoker{ |
| 96 | + cecxx::functions::multimodal::hgbat, |
| 97 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 98 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::scale{5.0, 100.0}, |
| 99 | + cecxx::benchmark::detail::rotation{}}}; |
| 100 | + |
| 101 | +static constexpr auto escaffer = detail::basic_problem_invoker{ |
| 102 | + cecxx::functions::multimodal::escaffer, |
| 103 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 104 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::rotation{}}}; |
| 105 | + |
| 106 | +static constexpr auto katsuura = detail::basic_problem_invoker{ |
| 107 | + cecxx::functions::multimodal::katsuura, |
| 108 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 109 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::scale{5.0, 100.0}, |
| 110 | + cecxx::benchmark::detail::rotation{}}}; |
| 111 | + |
| 112 | +static constexpr auto discus = detail::basic_problem_invoker{ |
| 113 | + cecxx::functions::multimodal::discus, |
| 114 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 115 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::rotation{}}}; |
| 116 | + |
| 117 | +static constexpr auto weierstrass = detail::basic_problem_invoker{ |
| 118 | + cecxx::functions::multimodal::weierstrass, |
| 119 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 120 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::scale{0.5, 100.0}, |
| 121 | + cecxx::benchmark::detail::rotation{}}}; |
| 122 | + |
| 123 | +static constexpr auto happycat = detail::basic_problem_invoker{ |
| 124 | + cecxx::functions::multimodal::happycat, |
| 125 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 126 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::scale{5.0, 100.0}, |
| 127 | + cecxx::benchmark::detail::rotation{}}}; |
| 128 | + |
| 129 | +static constexpr auto ackley = detail::basic_problem_invoker{ |
| 130 | + cecxx::functions::multimodal::ackley, |
| 131 | + {.rot = do_affine_trans::yes, .shift = do_affine_trans::yes}, |
| 132 | + std::tuple{cecxx::benchmark::detail::shift{}, cecxx::benchmark::detail::rotation{}}}; |
| 133 | + |
94 | 134 |
|
95 | 135 | } // namespace cecxx::benchmark::cec_2017 |
0 commit comments